allow structs without typedef as struct members

This commit is contained in:
overflowerror 2021-05-04 11:17:22 +02:00
parent 02f69dd2b2
commit fc796e2588

View file

@ -120,7 +120,7 @@ structmember: type ID
type: LONG { $$ = newTypeInfo(false, "long"); }
| DOUBLE { $$ = newTypeInfo(false, "double"); }
| STRING { $$ = newTypeInfo(false, "string"); }
| STRUCT ID { yyerror("structs without typedef are not yet supported"); YYERROR; }
| STRUCT ID { $$ = newTypeInfo(false, prefix($2, "struct ")); }
| ID { $$ = newTypeInfo(false, $1); }
| type POINTER
{