X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fparser_proc_grammar.y;h=6e07b5fd9fafb1ec9f1d4e781926d829ecde441c;hp=5f78335bfbd781e1fd5ee3a9ac2abf49da8c6d9b;hb=d57dd73ddbd960613cfc06bc4c9473b71d3598ef;hpb=02e801eabbe26a129ea05e6723c94e10bb653dab diff --git a/src/parser_proc_grammar.y b/src/parser_proc_grammar.y index 5f78335..6e07b5f 100644 --- a/src/parser_proc_grammar.y +++ b/src/parser_proc_grammar.y @@ -770,7 +770,7 @@ impl_def_val[val]: } | quoted_strings[token] { $val = psi_impl_def_val_init($token->type, $token->text); - $val->token = psi_token_copy($token); + $val->token = $token; } ; @@ -1111,9 +1111,10 @@ decl_extvar_stmt[list]: if (psi_decl_extvar_is_blacklisted(var->name)) { psi_decl_var_free(&var); } else { - list = psi_plist_add(list, psi_decl_extvar_init( - psi_decl_arg_init(psi_decl_type_copy($decl_arg->type), var))); - } + struct psi_decl_extvar *evar = psi_decl_extvar_init( + psi_decl_arg_init(psi_decl_type_copy($decl_arg->type), var)); + list = psi_plist_add(list, &evar); + } } free($vars); } @@ -1148,20 +1149,20 @@ decl_vars[vars]: ; ignored_decl: - STATIC decl_body ignored_decl_body { - $ignored_decl = $decl_body; -} -| STATIC CPP_INLINE decl_body ignored_decl_body { - $ignored_decl = $decl_body; -} -| CPP_INLINE decl_body ignored_decl_body { - $ignored_decl = $decl_body; -} -| NAME CPP_INLINE decl_body ignored_decl_body { + ignored_decl_qualifiers decl_body ignored_decl_body { $ignored_decl = $decl_body; } ; +ignored_decl_qualifiers: + STATIC +| STATIC CPP_INLINE +| CPP_EXTENSION CPP_INLINE +| CPP_EXTENSION STATIC CPP_INLINE +| CPP_INLINE +| NAME CPP_INLINE +; + ignored_decl_body: LBRACE ignored_decl_body_stmts RBRACE ; @@ -1269,6 +1270,7 @@ decl_functor_body[decl]: type->real.func = rval_decl; func->var->token = psi_token_copy($NAME); func->token = psi_token_copy($NAME); + type->token = type_token; $decl = psi_decl_init(func, $args); }