mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-01-16 22:58:15 +01:00
Revert "Recover from error inside alternative array deref syntax"
This reverts commit 9d44edf85dc5882e45fed37a6c541bf20e7c8495.
This commit is contained in:
parent
a167aa2061
commit
94d93f27a5
@ -891,7 +891,6 @@ callable_variable:
|
||||
| dereferencable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
|
||||
| constant '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
|
||||
| dereferencable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; }
|
||||
| dereferencable '{' error '}' { $$ = Expr\ArrayDimFetch[$1, new Expr\Error(stackAttributes(#3))]; }
|
||||
| function_call { $$ = $1; }
|
||||
| dereferencable T_OBJECT_OPERATOR property_name argument_list
|
||||
{ $$ = Expr\MethodCall[$1, $3, $4]; }
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1414,52 +1414,4 @@ array(
|
||||
$a = ["a "thing"];
|
||||
-----
|
||||
!!php7
|
||||
Syntax error, unexpected T_STRING, expecting ',' or ')' or ']' from 2:11 to 2:15
|
||||
-----
|
||||
<?php
|
||||
$obj->
|
||||
if ($foo) {
|
||||
echo "foo";
|
||||
$a->b();
|
||||
}
|
||||
$c->d();
|
||||
-----
|
||||
!!php7
|
||||
Syntax error, unexpected T_ECHO from 4:5 to 4:8
|
||||
array(
|
||||
0: Stmt_Expression(
|
||||
expr: Expr_ArrayDimFetch(
|
||||
var: Expr_MethodCall(
|
||||
var: Expr_Variable(
|
||||
name: obj
|
||||
)
|
||||
name: Identifier(
|
||||
name: if
|
||||
)
|
||||
args: array(
|
||||
0: Arg(
|
||||
value: Expr_Variable(
|
||||
name: foo
|
||||
)
|
||||
byRef: false
|
||||
unpack: false
|
||||
)
|
||||
)
|
||||
)
|
||||
dim: Expr_Error(
|
||||
)
|
||||
)
|
||||
)
|
||||
1: Stmt_Expression(
|
||||
expr: Expr_MethodCall(
|
||||
var: Expr_Variable(
|
||||
name: c
|
||||
)
|
||||
name: Identifier(
|
||||
name: d
|
||||
)
|
||||
args: array(
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Syntax error, unexpected T_STRING, expecting ',' or ')' or ']' from 2:11 to 2:15
|
Loading…
x
Reference in New Issue
Block a user