Added
- Errors can now store the attributes of the node/token where the error occurred. Previously only the start line was
stored. - If file positions are enabled in the lexer, errors can now provide column information if it is available. See documentation.
- The parser now provides an experimental error recovery mode, which can be enabled by disabling the
throwOnError
parser option. In this mode the parser will try to construct a partial AST even if the code is not valid PHP. See documentation. - Added support for PHP 7
yield from
expression. It is represented byExpr\YieldFrom
. - Added support for PHP 7 anonymous classes. These are represented by ordinary
Stmt\Class_
nodes with the name set tonull
. Furthermore this implies thatExpr\New_
can now contain aStmt\Class_
in itsclass
subnode.
Fixed
- Fixed registration of PHP 7 aliases, for the case where the old name was used before the new name.
- Fixed handling of precedence when pretty-printing
print
expressions. - Floating point numbers are now pretty-printed with a higher precision.
- Checks for special class names like
self
are now case-insensitive.