Fix Switch subnode order

Not that it makes much of a difference, but could have caused issues with
"out of order" visiting of nodes.
This commit is contained in:
nikic 2012-10-19 14:54:56 +02:00
parent af5d288fb3
commit 9d8e13b4a9
3 changed files with 8 additions and 8 deletions

View File

@ -16,8 +16,8 @@ class PHPParser_Node_Stmt_Case extends PHPParser_Node_Stmt
public function __construct($cond, array $stmts = array(), array $attributes = array()) {
parent::__construct(
array(
'stmts' => $stmts,
'cond' => $cond,
'stmts' => $stmts,
),
$attributes
);

View File

@ -15,7 +15,7 @@ new $a->b->c();
new $a->b['c']();
new $a->b{'c'}();
// test regression introduces by new dereferencing syntext
// test regression introduces by new dereferencing syntax
(new A);
-----
array(

View File

@ -23,23 +23,23 @@ array(
)
cases: array(
0: Stmt_Case(
stmts: array(
)
cond: Scalar_LNumber(
value: 0
)
)
1: Stmt_Case(
stmts: array(
)
)
1: Stmt_Case(
cond: Scalar_LNumber(
value: 1
)
)
2: Stmt_Case(
stmts: array(
)
)
2: Stmt_Case(
cond: null
stmts: array(
)
)
)
)