mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-27 04:24:43 +01:00
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:
parent
af5d288fb3
commit
9d8e13b4a9
@ -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
|
||||
);
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user