feroldi / cci

DEPRECATED PROJECT, see README
MIT License
37 stars 5 forks source link

Accept only ';' or declarator after struct-union or enum declarator #23

Closed feroldi closed 7 years ago

feroldi commented 7 years ago

This should be an error:

struct S { int i; }
//                 ^ missing ';'
int main() {}

Currently it compiles to:

compilation unit:
  function definition:
    declaration specifiers:
      struct or union specifier(struct):
        identifier(S)
        struct declaration:
          type specifier(int)
          identifier(i)
      type specifier(int)
    direct declarator:
      identifier(main)
      empty
    compound statement({):
      empty