Browse Source

add enums

txlyre 1 week ago
parent
commit
64342ace0e
1 changed files with 3 additions and 0 deletions
  1. 3 0
      qic.c

+ 3 - 0
qic.c

@@ -2501,6 +2501,9 @@ node_t *_parse_stmt(list_t *tokens, size_t *pos, int allow_comma) {
 
     EXPECT(LCB, "{");
 
+    if (AT(RCB))
+      PARSE_ERROR("empty enum");
+
     do {
       if (!AT(NAME))
         PARSE_ERROR("expected identifier");