Skip to content

Commit e3ca8eb

Browse files
committed
feat: use the new reserved rules api
1 parent 32c17ce commit e3ca8eb

File tree

5 files changed

+103795
-103824
lines changed

5 files changed

+103795
-103824
lines changed

grammar.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,22 @@ module.exports = grammar({
113113
[$.visibility_modifier, $.scoped_identifier, $.scoped_type_identifier],
114114
],
115115

116+
reserved: {
117+
global: $ => [
118+
'enum',
119+
'fn',
120+
'for',
121+
'if',
122+
'let',
123+
'loop',
124+
'match',
125+
'mod',
126+
'struct',
127+
'type',
128+
'while',
129+
],
130+
},
131+
116132
word: $ => $.identifier,
117133

118134
rules: {

src/grammar.json

Lines changed: 49 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)