Skip to content

Commit

Permalink
Allow comma before brace for named enum (#57)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Wutka <mark@wutka.com>
  • Loading branch information
wutka-vandy and wutka authored Nov 8, 2024
1 parent c95d785 commit 0efac29
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontc/cparser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,8 @@ enum_type:
{ENUM ("", List.rev $3)}
| ENUM type_name LBRACE enum_list RBRACE
{ENUM ($2, List.rev $4)}
| ENUM type_name LBRACE enum_list COMMA RBRACE
{ENUM ($2, List.rev $4)}
;
type_name:
IDENT {$1}
Expand Down

0 comments on commit 0efac29

Please sign in to comment.