Skip to content

Commit

Permalink
Merge pull request #260 from calebdw/enum_expr
Browse files Browse the repository at this point in the history
fix: allow expressions in enum values
  • Loading branch information
calebdw authored Oct 15, 2024
2 parents 9f02b54 + 6baba6e commit 42d9932
Show file tree
Hide file tree
Showing 8 changed files with 145,494 additions and 144,932 deletions.
2 changes: 1 addition & 1 deletion common/define-grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ module.exports = function defineGrammar(dialect) {
optional(field('attributes', $.attribute_list)),
keyword('case'),
field('name', $.name),
optional(seq('=', field('value', choice($._string, $.integer)))),
optional(seq('=', field('value', $.expression))),
$._semicolon,
),

Expand Down
13 changes: 2 additions & 11 deletions php/src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 1 addition & 17 deletions php/src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 42d9932

Please sign in to comment.