Struct and ivar declarations now seem to work.

However, not bit-fields.
This commit is contained in:
Bill Currie 2011-02-04 23:48:58 +09:00
parent 1f6abb2cce
commit 29fbc3b073

View file

@ -540,8 +540,18 @@ struct_decl_list
;
struct_decl
: function_decl {}
| var_decl {}
: function_decl
{
$1->type = append_type ($1->type, $<spec>0.type);
$1->type = find_type ($1->type);
symtab_addsymbol (current_symtab, $1);
}
| var_decl
{
$1->type = append_type ($1->type, $<spec>0.type);
$1->type = find_type ($1->type);
symtab_addsymbol (current_symtab, $1);
}
| var_decl ':' expr %prec COMMA {}
| ':' expr %prec COMMA {}
;