Merge branch '3.x'

Conflicts:
	lib/PhpParser/ParserAbstract.php
	test/code/parser/errorHandling/recovery.test
This commit is contained in:
Nikita Popov 2017-02-26 23:47:27 +01:00
commit 2beb4e7fd6
2 changed files with 4 additions and 3 deletions

View File

@ -334,6 +334,7 @@ abstract class ParserAbstract implements Parser
// We treat the error symbol as being empty, so we reset the end attributes
// to the end attributes of the last non-error symbol
$this->endAttributeStack[$stackPos] = $this->endAttributeStack[$stackPos - 1];
$this->endAttributes = $this->endAttributeStack[$stackPos - 1];
break;

View File

@ -310,7 +310,7 @@ array(
)
returnType: null
stmts: array(
0: Stmt_Expression[3:5 - 4:1](
0: Stmt_Expression[3:5 - 3:10](
expr: Expr_PropertyFetch[3:5 - 3:10](
var: Expr_Variable[3:5 - 3:8](
name: bar
@ -347,7 +347,7 @@ new
!!php7,positions
Syntax error, unexpected EOF from 2:4 to 2:4
array(
0: Stmt_Expression[2:1 - 2:4](
0: Stmt_Expression[2:1 - 2:3](
expr: Expr_New[2:1 - 2:3](
class: Expr_Error[2:4 - 2:3](
)
@ -924,7 +924,7 @@ array(
0: Bar
)
)
name: Expr_Error[3:10 - 3:10](
name: Expr_Error[3:10 - 3:9](
)
)
byRef: false