mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-07-13 10:26:33 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
aa6aec90e1 | |||
3e158a2313 |
11
CHANGELOG.md
11
CHANGELOG.md
@ -1,8 +1,17 @@
|
|||||||
Version 3.0.1-dev
|
Version 3.0.2-dev
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
Nothing yet.
|
Nothing yet.
|
||||||
|
|
||||||
|
Version 3.0.1 (2016-12-01)
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Fixed handling of nested `list()`s: If the nested list was unkeyed, it was directly included in
|
||||||
|
the list items. If it was keyed, it was wrapped in `ArrayItem`. Now nested `List_` nodes are
|
||||||
|
always wrapped in `ArrayItem`s.
|
||||||
|
|
||||||
Version 3.0.0 (2016-11-30)
|
Version 3.0.0 (2016-11-30)
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
|
@ -939,7 +939,7 @@ list_expr_elements:
|
|||||||
|
|
||||||
list_expr_element:
|
list_expr_element:
|
||||||
variable { $$ = Expr\ArrayItem[$1, null, false]; }
|
variable { $$ = Expr\ArrayItem[$1, null, false]; }
|
||||||
| list_expr { $$ = $1; }
|
| list_expr { $$ = Expr\ArrayItem[$1, null, false]; }
|
||||||
| /* empty */ { $$ = null; }
|
| /* empty */ { $$ = null; }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -823,7 +823,7 @@ list_expr_elements:
|
|||||||
|
|
||||||
list_expr_element:
|
list_expr_element:
|
||||||
variable { $$ = Expr\ArrayItem[$1, null, false]; }
|
variable { $$ = Expr\ArrayItem[$1, null, false]; }
|
||||||
| list_expr { $$ = $1; }
|
| list_expr { $$ = Expr\ArrayItem[$1, null, false]; }
|
||||||
| expr T_DOUBLE_ARROW variable { $$ = Expr\ArrayItem[$3, $1, false]; }
|
| expr T_DOUBLE_ARROW variable { $$ = Expr\ArrayItem[$3, $1, false]; }
|
||||||
| expr T_DOUBLE_ARROW list_expr { $$ = Expr\ArrayItem[$3, $1, false]; }
|
| expr T_DOUBLE_ARROW list_expr { $$ = Expr\ArrayItem[$3, $1, false]; }
|
||||||
| /* empty */ { $$ = null; }
|
| /* empty */ { $$ = null; }
|
||||||
|
@ -3035,7 +3035,7 @@ class Php5 extends \PhpParser\ParserAbstract
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function reduceRule523() {
|
protected function reduceRule523() {
|
||||||
$this->semValue = $this->semStack[$this->stackPos-(1-1)];
|
$this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function reduceRule524() {
|
protected function reduceRule524() {
|
||||||
|
@ -2657,7 +2657,7 @@ class Php7 extends \PhpParser\ParserAbstract
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function reduceRule460() {
|
protected function reduceRule460() {
|
||||||
$this->semValue = $this->semStack[$this->stackPos-(1-1)];
|
$this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function reduceRule461() {
|
protected function reduceRule461() {
|
||||||
|
@ -246,7 +246,9 @@ array(
|
|||||||
)
|
)
|
||||||
byRef: false
|
byRef: false
|
||||||
)
|
)
|
||||||
1: Expr_List(
|
1: Expr_ArrayItem(
|
||||||
|
key: null
|
||||||
|
value: Expr_List(
|
||||||
items: array(
|
items: array(
|
||||||
0: null
|
0: null
|
||||||
1: Expr_ArrayItem(
|
1: Expr_ArrayItem(
|
||||||
@ -258,6 +260,8 @@ array(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
byRef: false
|
||||||
|
)
|
||||||
2: Expr_ArrayItem(
|
2: Expr_ArrayItem(
|
||||||
key: null
|
key: null
|
||||||
value: Expr_Variable(
|
value: Expr_Variable(
|
||||||
|
Reference in New Issue
Block a user