Update changelog, fix typos

This commit is contained in:
Nikita Popov 2015-05-01 19:57:10 +02:00
parent 648800f07f
commit 659d26c231
2 changed files with 9 additions and 10 deletions

View File

@ -5,20 +5,20 @@ Version 1.3.0-dev
* 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.
TODO/link
* If file positions are enabled in the lexer, errors can now provide column information if it is available. See
[documentation](https://github.com/nikic/PHP-Parser/blob/master/doc/component/Error.markdown#column-information).
* 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.
TODO/link
parser option. In this mode the parser will try to construct a partial AST even if the code is not valid PHP. See
[documentation](https://github.com/nikic/PHP-Parser/blob/master/doc/component/Error.markdown#error-recovery).
* Added support for PHP 7 `yield from` expression. It is represented by `Expr\YieldFrom`.
* Added support for PHP 7 anonymous classes. These are represented by ordinary `Stmt\Class_` nodes with the name set to
`null`. Furthermore this implies that `Expr\New_` can now contain a `Stmt\Class_` in its `class` 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.
Version 1.2.2 (2015-04-03)

View File

@ -27,7 +27,7 @@ try {
}
```
Before using column information it's availability needs to be checked with `$e->hasColumnInfo()`, as the precise
Before using column information its availability needs to be checked with `$e->hasColumnInfo()`, as the precise
location of an error cannot always be determined. The methods for retrieving column information also have to be passed
the source code of the parsed file. An example for printing an error:
@ -40,7 +40,7 @@ if ($e->hasColumnInfo()) {
}
```
Both line numbers and column numbers are 1-based. EOF errors will be positioned at the position one past the end of the
Both line numbers and column numbers are 1-based. EOF errors will be located at the position one past the end of the
file.
Error recovery
@ -48,9 +48,8 @@ Error recovery
> **EXPERIMENTAL**
By default the parser will stop throw an exception upon encountering the first error during parsing. The parser also
supports an alternative mode, in which the parser will remember the error, but try to continue parsing the rest of the
source code.
By default the parser will throw an exception upon encountering the first error during parsing. An alternative mode is
also supported, in which the parser will remember the error, but try to continue parsing the rest of the source code.
To enable this mode the `throwOnError` parser option needs to be disabled. Any errors that occurred during parsing can
then be retrieved using `$parser->getErrors()`. The `$parser->parse()` method will either return a partial syntax tree