Accept enums and structs defined at global scope

This commit is contained in:
Randy Heit 2013-08-24 20:28:26 -05:00
parent 956d754804
commit 80daf736ec

View file

@ -79,6 +79,8 @@ translation_unit(X) ::= error. { X = NULL; }
%type external_declaration {ZCC_TreeNode *} %type external_declaration {ZCC_TreeNode *}
external_declaration(X) ::= class_definition(A). { X = A; } external_declaration(X) ::= class_definition(A). { X = A; }
external_declaration(X) ::= struct_def(A). { X = A; }
external_declaration(X) ::= enum_def(A). { X = A; }
/* Optional bits. */ /* Optional bits. */
opt_semicolon ::= . opt_semicolon ::= .