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()) {
|
public function __construct($cond, array $stmts = array(), array $attributes = array()) {
|
||||||
parent::__construct(
|
parent::__construct(
|
||||||
array(
|
array(
|
||||||
'stmts' => $stmts,
|
|
||||||
'cond' => $cond,
|
'cond' => $cond,
|
||||||
|
'stmts' => $stmts,
|
||||||
),
|
),
|
||||||
$attributes
|
$attributes
|
||||||
);
|
);
|
||||||
|
@ -15,7 +15,7 @@ new $a->b->c();
|
|||||||
new $a->b['c']();
|
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);
|
(new A);
|
||||||
-----
|
-----
|
||||||
array(
|
array(
|
||||||
|
@ -23,23 +23,23 @@ array(
|
|||||||
)
|
)
|
||||||
cases: array(
|
cases: array(
|
||||||
0: Stmt_Case(
|
0: Stmt_Case(
|
||||||
stmts: array(
|
|
||||||
)
|
|
||||||
cond: Scalar_LNumber(
|
cond: Scalar_LNumber(
|
||||||
value: 0
|
value: 0
|
||||||
)
|
)
|
||||||
)
|
|
||||||
1: Stmt_Case(
|
|
||||||
stmts: array(
|
stmts: array(
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
1: Stmt_Case(
|
||||||
cond: Scalar_LNumber(
|
cond: Scalar_LNumber(
|
||||||
value: 1
|
value: 1
|
||||||
)
|
)
|
||||||
)
|
|
||||||
2: Stmt_Case(
|
|
||||||
stmts: array(
|
stmts: array(
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
2: Stmt_Case(
|
||||||
cond: null
|
cond: null
|
||||||
|
stmts: array(
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user