Commit 8b1ad064 authored by Sergio Costas's avatar Sergio Costas

Added support for empty structs

parent 9c8b4984
......@@ -459,10 +459,19 @@ struct_or_union_specifier
free_tree($2);
free_tree($3);
free_tree($5); }
| struct_or_union IDENTIFIER '{' '}' { $$ = $1; show_debug(__LINE__, $$, "struct_or_union_specifier");
free($$->name);
$$->name = mystrdup($2->data);
free_tree($2);
free_tree($3);
free_tree($4); }
| struct_or_union '{' struct_declaration_list '}' { $$ = $1; show_debug(__LINE__, $$, "struct_or_union_specifier");
$$->struct_data = $3;
free_tree($2);
free_tree($4); }
| struct_or_union '{' '}' { $$ = $1; show_debug(__LINE__, $$, "struct_or_union_specifier");
free_tree($2);
free_tree($3); }
| struct_or_union IDENTIFIER { $$ = $1; show_debug(__LINE__, $$, "struct_or_union_specifier");
free($$->name);
$$->name = mystrdup($2->data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment