X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=src%2Fparser_proc.y;h=62e8011992d36fa3d6acb530a0b1e0f3002f7fa2;hb=7474b3e23338ea03bcd65551959e2582cc455f9f;hp=efffcf79fdc0061da00aa89c609190d9d8cb0cc1;hpb=d60f4bbdd315ddf42dbafeff0fd3d87d2e7a51f7;p=m6w6%2Fext-psi diff --git a/src/parser_proc.y b/src/parser_proc.y index efffcf7..62e8011 100644 --- a/src/parser_proc.y +++ b/src/parser_proc.y @@ -17,6 +17,9 @@ %syntax_error { PSI_ParserSyntaxError(P, P->fn, P->line, "Unexpected token '%s'", TOKEN->text); } + +%nonassoc NAME. + file ::= blocks. blocks ::= block. @@ -240,6 +243,11 @@ decl_type(type_) ::= NAME(T). { type_ = init_decl_type(T->type, T->text); free(T); } +decl_type(type_) ::= STRUCT(S) NAME(T). { + type_ = init_decl_type(S->type, T->text); + free(S); + free(T); +} %type impl {impl*} %destructor impl {free_impl($$);}