Skip to content

Instantly share code, notes, and snippets.

@morrisonlevi
Created May 30, 2017 22:14
Show Gist options
  • Save morrisonlevi/59b9dc9b26ecf16b4dac0c2202da76e8 to your computer and use it in GitHub Desktop.
Save morrisonlevi/59b9dc9b26ecf16b4dac0c2202da76e8 to your computer and use it in GitHub Desktop.
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index f1a7e38..a9b5a48 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -550,7 +550,6 @@ foreach_variable:
variable { $$ = $1; }
| '&' variable { $$ = zend_ast_create(ZEND_AST_REF, $2); }
| T_LIST '(' array_pair_list ')' { $$ = $3; $$->attr = ZEND_ARRAY_SYNTAX_LIST; }
- | '[' array_pair_list ']' { $$ = $2; $$->attr = ZEND_ARRAY_SYNTAX_SHORT; }
;
for_statement:
@@ -872,8 +871,6 @@ new_expr:
expr_without_variable:
T_LIST '(' array_pair_list ')' '=' expr
{ $3->attr = ZEND_ARRAY_SYNTAX_LIST; $$ = zend_ast_create(ZEND_AST_ASSIGN, $3, $6); }
- | '[' array_pair_list ']' '=' expr
- { $2->attr = ZEND_ARRAY_SYNTAX_SHORT; $$ = zend_ast_create(ZEND_AST_ASSIGN, $2, $5); }
| variable '=' expr
{ $$ = zend_ast_create(ZEND_AST_ASSIGN, $1, $3); }
| variable '=' '&' variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment