diff options
author | Nikita Popov <nikic@php.net> | 2015-04-26 15:54:30 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-04-26 15:54:30 +0200 |
commit | f2f890a256d6605448db5bf4604da6f63fbd6fea (patch) | |
tree | 013c3799f55f7145bfa8b4f2348bb971a3a88c79 /Zend/zend_language_parser.y | |
parent | 03d7042d5cd8b080eb945860626f6ab47b0658f8 (diff) | |
download | php-git-f2f890a256d6605448db5bf4604da6f63fbd6fea.tar.gz |
More cleanup (mainly retab)
Diffstat (limited to 'Zend/zend_language_parser.y')
-rw-r--r-- | Zend/zend_language_parser.y | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index b197bde991..2541c9f571 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -241,7 +241,8 @@ static YYSIZE_T zend_yytnamerr(char*, const char*); %type <ast> extends_from parameter optional_type argument expr_without_variable global_var %type <ast> static_var class_statement trait_adaptation trait_precedence trait_alias %type <ast> absolute_trait_method_reference trait_method_reference property echo_expr -%type <ast> new_expr anonymous_class class_name class_name_reference simple_variable internal_functions_in_yacc +%type <ast> new_expr anonymous_class class_name class_name_reference simple_variable +%type <ast> internal_functions_in_yacc %type <ast> exit_expr scalar backticks_expr lexical_var function_call member_name %type <ast> variable_class_name dereferencable_scalar class_name_scalar constant dereferencable %type <ast> callable_expr callable_variable static_member new_variable @@ -799,22 +800,20 @@ non_empty_for_exprs: ; anonymous_class: - T_CLASS ctor_arguments { - $<num>$ = CG(zend_lineno); - } extends_from implements_list backup_doc_comment '{' class_statement_list '}' { - zend_ast *decl = zend_ast_create_decl( - ZEND_AST_CLASS, - ZEND_ACC_ANON_CLASS, - $<num>3, $6, $4, $4, $5, $8, NULL); - $$ = zend_ast_create(ZEND_AST_NEW, decl, $2); - } + T_CLASS { $<num>$ = CG(zend_lineno); } ctor_arguments + extends_from implements_list backup_doc_comment '{' class_statement_list '}' { + zend_ast *decl = zend_ast_create_decl( + ZEND_AST_CLASS, ZEND_ACC_ANON_CLASS, $<num>2, $6, NULL, + $4, $5, $8, NULL); + $$ = zend_ast_create(ZEND_AST_NEW, decl, $3); + } ; new_expr: T_NEW class_name_reference ctor_arguments { $$ = zend_ast_create(ZEND_AST_NEW, $2, $3); } - | T_NEW anonymous_class - { $$ = $2; } + | T_NEW anonymous_class + { $$ = $2; } ; expr_without_variable: |