mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-07-25 08:11:22 +02:00
Adjust list and yield parsing, update prettyprinter
* nested list()s will now create nested List nodes (instead of just nested arrays) * yield $k => $v was parsed with key and value swapped. This is now fixed * the pretty printer now works with the newly added language constructs
This commit is contained in:
@@ -185,10 +185,12 @@ array(
|
||||
0: Expr_Variable(
|
||||
name: a
|
||||
)
|
||||
1: array(
|
||||
0: null
|
||||
1: Expr_Variable(
|
||||
name: c
|
||||
1: Expr_List(
|
||||
vars: array(
|
||||
0: null
|
||||
1: Expr_Variable(
|
||||
name: c
|
||||
)
|
||||
)
|
||||
)
|
||||
2: Expr_Variable(
|
||||
|
@@ -45,10 +45,10 @@ array(
|
||||
)
|
||||
2: Expr_Yield(
|
||||
key: Expr_Variable(
|
||||
name: value
|
||||
name: key
|
||||
)
|
||||
value: Expr_Variable(
|
||||
name: key
|
||||
name: value
|
||||
)
|
||||
)
|
||||
3: Expr_Assign(
|
||||
@@ -77,10 +77,10 @@ array(
|
||||
)
|
||||
expr: Expr_Yield(
|
||||
key: Expr_Variable(
|
||||
name: value
|
||||
name: key
|
||||
)
|
||||
value: Expr_Variable(
|
||||
name: key
|
||||
name: value
|
||||
)
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user