mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2025-01-22 05:11:39 +01:00
Fix AST for ClassName::$methodName()
This commit is contained in:
parent
dc4182277f
commit
aea2f67c52
@ -540,7 +540,7 @@ function_call:
|
||||
{ $$ = Expr_StaticCall[$1, $3, $5]; }
|
||||
| static_property_with_arrays '(' function_call_argument_list ')' {
|
||||
if ($1 instanceof PHPParser_Node_Expr_StaticPropertyFetch) {
|
||||
$$ = Expr_StaticCall[$1->class, $1->name, $3];
|
||||
$$ = Expr_StaticCall[$1->class, Expr_Variable[$1->name], $3];
|
||||
} elseif ($1 instanceof PHPParser_Node_Expr_ArrayDimFetch) {
|
||||
$tmp = $1;
|
||||
while ($tmp->var instanceof PHPParser_Node_Expr_ArrayDimFetch) {
|
||||
|
@ -1939,7 +1939,7 @@ class PHPParser_Parser
|
||||
protected function yyn239($line, $docComment) {
|
||||
|
||||
if ($this->yyastk[$this->yysp-(4-1)] instanceof PHPParser_Node_Expr_StaticPropertyFetch) {
|
||||
$this->yyval = new PHPParser_Node_Expr_StaticCall($this->yyastk[$this->yysp-(4-1)]->class, $this->yyastk[$this->yysp-(4-1)]->name, $this->yyastk[$this->yysp-(4-3)], $line, $docComment);
|
||||
$this->yyval = new PHPParser_Node_Expr_StaticCall($this->yyastk[$this->yysp-(4-1)]->class, new PHPParser_Node_Expr_Variable($this->yyastk[$this->yysp-(4-1)]->name, $line, $docComment), $this->yyastk[$this->yysp-(4-3)], $line, $docComment);
|
||||
} elseif ($this->yyastk[$this->yysp-(4-1)] instanceof PHPParser_Node_Expr_ArrayDimFetch) {
|
||||
$tmp = $this->yyastk[$this->yysp-(4-1)];
|
||||
while ($tmp->var instanceof PHPParser_Node_Expr_ArrayDimFetch) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user