From c28fd5e413d616fcac79ab48df7828b0388db8a5 Mon Sep 17 00:00:00 2001 From: Mark Wutka Date: Thu, 7 Nov 2024 11:02:37 -0500 Subject: [PATCH] Allow comma before brace for named enum --- frontc/cparser.mly | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontc/cparser.mly b/frontc/cparser.mly index 6335fcb..62403ab 100644 --- a/frontc/cparser.mly +++ b/frontc/cparser.mly @@ -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}