@@ -260,7 +260,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
260260%type <ast> identifier type_expr_without_static union_type_without_static
261261%type <ast> inline_function union_type
262262%type <ast> attributed_statement attributed_class_statement attributed_parameter
263- %type <ast> attribute_arguments attribute_decl attribute attributes
263+ %type <ast> attribute_decl attribute attributes
264264
265265%type <num> returns_ref function fn is_reference is_variadic variable_modifiers
266266%type <num> method_modifiers non_empty_member_modifiers member_modifier optional_visibility_modifier
@@ -317,20 +317,11 @@ name:
317317 | T_NS_SEPARATOR namespace_name { $$ = $2 ; $$ ->attr = ZEND_NAME_FQ; }
318318;
319319
320- attribute_arguments :
321- expr
322- { $$ = zend_ast_create_list(1 , ZEND_AST_ARG_LIST, $1 ); }
323- | attribute_arguments ' ,' expr
324- { $$ = zend_ast_list_add($1 , $3 ); }
325- ;
326-
327320attribute_decl :
328321 class_name
329322 { $$ = zend_ast_create(ZEND_AST_ATTRIBUTE, $1 , NULL ); }
330- | class_name ' (' ' )'
331- { $$ = zend_ast_create(ZEND_AST_ATTRIBUTE, $1 , NULL ); }
332- | class_name ' (' attribute_arguments ' )'
333- { $$ = zend_ast_create(ZEND_AST_ATTRIBUTE, $1 , $3 ); }
323+ | class_name argument_list
324+ { $$ = zend_ast_create(ZEND_AST_ATTRIBUTE, $1 , $2 ); }
334325;
335326
336327attribute :
0 commit comments