Fix pretty printing of include expressions

This commit is contained in:
nikic
2013-07-27 16:23:27 +02:00
parent f9c3aa2a22
commit 77c08a75c9
3 changed files with 10 additions and 0 deletions

View File

@@ -25,6 +25,8 @@ Version 0.9.4-dev
* An interface for the node traversation has been added: `PHPParser_NodeTraverserInterface` * An interface for the node traversation has been added: `PHPParser_NodeTraverserInterface`
* Fix pretty printing of `include` expressions (precedence information was missing)
Version 0.9.3 (22.11.2012) Version 0.9.3 (22.11.2012)
-------------------------- --------------------------

View File

@@ -60,6 +60,7 @@ abstract class PHPParser_PrettyPrinterAbstract
'Expr_LogicalAnd' => array(16, -1), 'Expr_LogicalAnd' => array(16, -1),
'Expr_LogicalXor' => array(17, -1), 'Expr_LogicalXor' => array(17, -1),
'Expr_LogicalOr' => array(18, -1), 'Expr_LogicalOr' => array(18, -1),
'Expr_Include' => array(19, -1),
); );
protected $noIndentToken; protected $noIndentToken;

View File

@@ -0,0 +1,7 @@
Include
-----
<?php
(include $foo) && (include $bar);
-----
(include $foo) && (include $bar);