mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-30 04:29:15 +01:00
Fix pretty printing issues caused by Expr_InstanceOf vs Expr_Instanceof
This commit is contained in:
parent
bf00dff2cf
commit
8294ceb754
@ -497,7 +497,7 @@ expr:
|
||||
| expr T_IS_SMALLER_OR_EQUAL expr { $$ = new Node_Expr_SmallerOrEqual(array('left' => $1, 'right' => $3)); }
|
||||
| expr '>' expr { $$ = new Node_Expr_Greater(array('left' => $1, 'right' => $3)); }
|
||||
| expr T_IS_GREATER_OR_EQUAL expr { $$ = new Node_Expr_GreaterOrEqual(array('left' => $1, 'right' => $3)); }
|
||||
| expr T_INSTANCEOF class_name_reference { $$ = new Node_Expr_InstanceOf(array('expr' => $1, 'class' => $3)); }
|
||||
| expr T_INSTANCEOF class_name_reference { $$ = new Node_Expr_Instanceof(array('expr' => $1, 'class' => $3)); }
|
||||
| '(' expr ')' { $$ = $2; }
|
||||
| expr '?' expr ':' expr { $$ = new Node_Expr_Ternary(array('cond' => $1, 'if' => $3, 'else' => $5)); }
|
||||
| expr '?' ':' expr { $$ = new Node_Expr_Ternary(array('cond' => $1, 'if' => null, 'else' => $4)); }
|
||||
|
@ -497,7 +497,7 @@ expr:
|
||||
| expr T_IS_SMALLER_OR_EQUAL expr { $$ = Expr_SmallerOrEqual[left: $1, right: $3]; }
|
||||
| expr '>' expr { $$ = Expr_Greater[left: $1, right: $3]; }
|
||||
| expr T_IS_GREATER_OR_EQUAL expr { $$ = Expr_GreaterOrEqual[left: $1, right: $3]; }
|
||||
| expr T_INSTANCEOF class_name_reference { $$ = Expr_InstanceOf[expr: $1, class: $3]; }
|
||||
| expr T_INSTANCEOF class_name_reference { $$ = Expr_Instanceof[expr: $1, class: $3]; }
|
||||
| '(' expr ')' { $$ = $2; }
|
||||
| expr '?' expr ':' expr { $$ = Expr_Ternary[cond: $1, if: $3, else: $5]; }
|
||||
| expr '?' ':' expr { $$ = Expr_Ternary[cond: $1, if: null, else: $4]; }
|
||||
|
@ -4,6 +4,6 @@
|
||||
* @property Node_Expr $expr Expression
|
||||
* @property Node_Expr $class Class name
|
||||
*/
|
||||
class Node_Expr_InstanceOf extends Node_Expr
|
||||
class Node_Expr_Instanceof extends Node_Expr
|
||||
{
|
||||
}
|
@ -1862,7 +1862,7 @@ class Parser
|
||||
}
|
||||
|
||||
private function yyn209() {
|
||||
$this->yyval = new Node_Expr_InstanceOf(array('expr' => $this->yyastk[$this->yysp-(3-1)], 'class' => $this->yyastk[$this->yysp-(3-3)]));
|
||||
$this->yyval = new Node_Expr_Instanceof(array('expr' => $this->yyastk[$this->yysp-(3-1)], 'class' => $this->yyastk[$this->yysp-(3-3)]));
|
||||
}
|
||||
|
||||
private function yyn210() {
|
||||
|
@ -2264,7 +2264,7 @@ class ParserDebug
|
||||
}
|
||||
|
||||
private function yyn209() {
|
||||
$this->yyval = new Node_Expr_InstanceOf(array('expr' => $this->yyastk[$this->yysp-(3-1)], 'class' => $this->yyastk[$this->yysp-(3-3)]));
|
||||
$this->yyval = new Node_Expr_Instanceof(array('expr' => $this->yyastk[$this->yysp-(3-1)], 'class' => $this->yyastk[$this->yysp-(3-3)]));
|
||||
}
|
||||
|
||||
private function yyn210() {
|
||||
|
Loading…
Reference in New Issue
Block a user