Raise the minimum php version from 7.0 to 7.2.
Depend on phpunit 8 for local development
Unify method names for Node and Token to getFullStartPosition and getStartPosition
(Consistently end public API methods with Position).
Avoid the need for callers to check if an object is a Node/Token before
calling a method.
Convert UnsetIntrinsicExpression to UnsetStatement - it can only be used
as a statement.
Unify previously split up lists into a single list in some AST node
properties (initially done that way for backward compatibility)
Clean up unnecessary special case for throw
- This continues to be parsed as an ExpressionStatement with the same
precedence
Rename throwStatement to throwExpression in test file names.
Deprecation warning: require.Microsoft/tolerant-php-parser is invalid,
it should not contain uppercase characters. Please use
microsoft/tolerant-php-parser instead. Make sure you fix this as
Composer 2.0 will error.
Update tests diagnostics and expected generated ASTs
For backwards compatibility, continue to make `yield from expr`
have an ArrayElement as a child node.
To maintain the invariant that all Nodes must have at least one child,
make $yieldExpression->arrayElement be null when parsing `yield;`
Aside: `yield &$a;` is (and should be)
parsed as the binary operator `(yield) & ($a)`.
This is surprising, but makes sense, being the only sane parse tree.
- Add a unit test that `yield & &$a;` is invalid.
There is no way to parse that.
Verified with the PHP module nikic/php-ast
```php
var_export(ast_dump(
ast\parse_code('<?php function test() { yield & $x; }', 50)
));
```