- : identifier opt_assign_expr {
- /* make the symbol one level up */
- $1->level-- ;
- $1->type = copyLinkChain($2->type);
- $1->etype= getSpec($1->type);
- SPEC_ENUM($1->etype) = 1;
- $$ = $1 ;
-
- }
+ : identifier opt_assign_expr
+ {
+ /* make the symbol one level up */
+ $1->level-- ;
+ $1->type = copyLinkChain($2->type);
+ $1->etype= getSpec($1->type);
+ SPEC_ENUM($1->etype) = 1;
+ $$ = $1 ;
+ // do this now, so we can use it for the next enums in the list
+ addSymChain($1);
+ }