Skip to content

Commit

Permalink
Use init_declarator in enumerator_statement
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedThree committed Jan 8, 2025
1 parent 2c7889d commit af4e581
Show file tree
Hide file tree
Showing 5 changed files with 372,521 additions and 372,489 deletions.
9 changes: 3 additions & 6 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1589,13 +1589,10 @@ module.exports = grammar({
enumerator_statement: $ => seq(
caseInsensitive('enumerator'),
optional('::'),
commaSep1(choice(
commaSep1(field('declarator', choice(
$.identifier,
seq($.identifier, '=', choice(
$.number_literal,
$.unary_expression,
))
))
alias($._declaration_assignment, $.init_declarator),
)))
),

end_enum_statement: $ => whiteSpacedKeyword('end', 'enum'),
Expand Down
Loading

0 comments on commit af4e581

Please sign in to comment.