mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
Implement a[0] syntax from merge
This commit is contained in:
parent
38a173916c
commit
ef5f3390e7
@ -965,10 +965,16 @@ scalar:
|
||||
| T_START_HEREDOC encaps_list T_END_HEREDOC { $$.ast = $2.ast; }
|
||||
| dereferencable_scalar { $$.ast = $1.ast; }
|
||||
| class_name_scalar { $$.ast = $1.ast; }
|
||||
| class_constant { $$.ast = $1.ast; }
|
||||
| name { $$.ast = zend_ast_create(ZEND_AST_CONST, $1.ast); }
|
||||
| constant { $$.ast = $1.ast; }
|
||||
;
|
||||
|
||||
constant:
|
||||
name { $$.ast = zend_ast_create(ZEND_AST_CONST, $1.ast); }
|
||||
| class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING
|
||||
{ $$.ast = zend_ast_create(ZEND_AST_CLASS_CONST, $1.ast, $3.ast); }
|
||||
| variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING
|
||||
{ $$.ast = zend_ast_create(ZEND_AST_CLASS_CONST, $1.ast, $3.ast); }
|
||||
;
|
||||
|
||||
possible_comma:
|
||||
/* empty */
|
||||
@ -1005,6 +1011,8 @@ callable_variable:
|
||||
{ $$.ast = zend_ast_create(ZEND_AST_VAR, $1.ast); }
|
||||
| dereferencable '[' dim_offset ']'
|
||||
{ $$.ast = zend_ast_create(ZEND_AST_DIM, $1.ast, $3.ast); }
|
||||
| constant '[' dim_offset ']'
|
||||
{ $$.ast = zend_ast_create(ZEND_AST_DIM, $1.ast, $3.ast); }
|
||||
| dereferencable '{' expr '}'
|
||||
{ $$.ast = zend_ast_create(ZEND_AST_DIM, $1.ast, $3.ast); }
|
||||
| dereferencable T_OBJECT_OPERATOR member_name argument_list
|
||||
@ -1161,13 +1169,6 @@ isset_variable:
|
||||
expr { $$.ast = zend_ast_create(ZEND_AST_ISSET, $1.ast); }
|
||||
;
|
||||
|
||||
class_constant:
|
||||
class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING
|
||||
{ $$.ast = zend_ast_create(ZEND_AST_CLASS_CONST, $1.ast, $3.ast); }
|
||||
| variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING
|
||||
{ $$.ast = zend_ast_create(ZEND_AST_CLASS_CONST, $1.ast, $3.ast); }
|
||||
;
|
||||
|
||||
class_name_scalar:
|
||||
class_name T_PAAMAYIM_NEKUDOTAYIM T_CLASS
|
||||
{ $$.ast = zend_ast_create(ZEND_AST_RESOLVE_CLASS_NAME, $1.ast); }
|
||||
|
Loading…
Reference in New Issue
Block a user