#
f7d484aa |
| 20-Dec-2023 |
Nikita Popov |
Fix handling of empty input Fixes #967.
|
#
06c7ab51 |
| 16-Sep-2023 |
Nikita Popov |
Drop Lexer::getTokens() method This doesn't make a lot of sense now that Lexer::tokenize() returns the tokens. The tokens for the last parse should be fetched via Parser::ge
Drop Lexer::getTokens() method This doesn't make a lot of sense now that Lexer::tokenize() returns the tokens. The tokens for the last parse should be fetched via Parser::getTokens() instead.
show more ...
|
#
502b0909 |
| 16-Aug-2023 |
Nikita Popov |
Add property types Types omitted in two places where we violate them currently: Namespace_::$stmts can be null during parsing, and Enum_::$scalarType can be a complex type for invali
Add property types Types omitted in two places where we violate them currently: Namespace_::$stmts can be null during parsing, and Enum_::$scalarType can be a complex type for invalid programs.
show more ...
|
#
ba851243 |
| 13-Aug-2023 |
Nikita Popov |
Replace startLexing() with tokenize() For now Lexer::getTokens() still exists, but should probably be removed.
|
#
4b497045 |
| 29-Jul-2023 |
Nikita Popov |
Move attribute handling into parser The Lexer now only provides the tokens to the parser, while the parser is responsible for determining which attributes are placed on notes. This o
Move attribute handling into parser The Lexer now only provides the tokens to the parser, while the parser is responsible for determining which attributes are placed on notes. This only needs to be done when the attributes are actually needed, rather than for all tokens. This removes the usedAttributes lexer option (and lexer options entirely). The attributes are now enabled unconditionally. They have less overhead now, and the need to explicitly enable them for some use cases (e.g. formatting-preserving printing) doesn't seem like a good tradeoff anymore. There are some additional changes to the Lexer interface that should be done after this, and the docs / upgrading guide haven't been adjusted yet.
show more ...
|
#
748aab33 |
| 09-Jul-2023 |
Nikita Popov |
Don't set start attributes for whitespace These will get overwritten later anyway.
|
#
8ad41294 |
| 14-Dec-2022 |
Markus Staab |
Declare list types (#907) Closes #905
|
#
f98341f6 |
| 17-Sep-2022 |
Nikita Popov |
Specify more types
|
#
fc6b4890 |
| 11-Sep-2022 |
Nikita Popov |
Specify more types
|
#
48f470ea |
| 11-Sep-2022 |
Nikita Popov |
Add missing return types
|
#
f63081a5 |
| 04-Sep-2022 |
Nikita Popov |
Partial documentation update
|
#
dd63ddbc |
| 28-Aug-2022 |
Nikita Popov |
Add php-cs-fixer config and reformat The formatting in this project has become something of a mess, because it changed over time. Add a CS fixer config and reformat to the desired st
Add php-cs-fixer config and reformat The formatting in this project has become something of a mess, because it changed over time. Add a CS fixer config and reformat to the desired style, which is PSR-12, but with sane brace placement.
show more ...
|
#
653757be |
| 04-Jul-2022 |
MathiasReker |
Nullable type declaration for default null value Adds ? before type declarations for parameters with a default null value
|
#
c878d719 |
| 19-Jun-2022 |
Nikita Popov |
Move token mapping from lexer to parser This allows a different token mapping per parser.
|
#
6e0eec80 |
| 19-Jun-2022 |
Nikita Popov |
Move definition of compatibility tokens into separate file
|
#
aff98bbf |
| 04-Jun-2022 |
Nikita Popov |
Use PHP 8.0 token representation Migrate everything to use PhpToken-compatible token representation, rather than the legacy array/string representation.
|
#
55c42692 |
| 21-Jul-2021 |
Máté Kocsis |
Add support for new PHP 8.1 modifiers (#796) Implement support for readonly properties (https://wiki.php.net/rfc/readonly_properties_v2) and final class contstants (https://wiki.php.net/
Add support for new PHP 8.1 modifiers (#796) Implement support for readonly properties (https://wiki.php.net/rfc/readonly_properties_v2) and final class contstants (https://wiki.php.net/rfc/final_class_const).
show more ...
|
#
c758510a |
| 09-Jul-2021 |
Nikita Popov |
Add support for PHP 8.1 With the introduction of intersection types, PHP now lexes the token '&' either as T_AMPERSAND_(NOT_)FOLLOWED_BY_VAR_OR_VARARG. This completely breaks parsing
Add support for PHP 8.1 With the introduction of intersection types, PHP now lexes the token '&' either as T_AMPERSAND_(NOT_)FOLLOWED_BY_VAR_OR_VARARG. This completely breaks parsing of any code containing '&'. Fix this by canonicalizing to the new token format (unconditionally, independent of emulation) and adjusting the parser to use the two new tokens. This doesn't add actual support for intersection types yet.
show more ...
|
#
4848a0d7 |
| 25-Apr-2021 |
Nikita Popov |
Check for \r as newline in closing tag Fixes #761.
|
#
a8223f22 |
| 20-Mar-2021 |
Nikita Popov |
Add emulation for enum keyword
|
#
bc7a9bf9 |
| 01-Dec-2020 |
Stefano Arlandini |
Remove useless code left from old implementation
|
#
b9b65a29 |
| 26-Sep-2020 |
Nikita Popov |
Fix check for token emulation conflicts
|
#
f66a32e2 |
| 06-Sep-2020 |
Nikita Popov |
Emulate PHP 8 attribute syntax Perform emulation by replacing #[ with %[, then patching % back to # and coalescing #[ into T_ATTRIBUTE if it is a freestanding token.
|
#
e3872b89 |
| 06-Sep-2020 |
Nikita Popov |
Improve compatibility with other libs defining compat tokens
|
#
35306de3 |
| 29-Aug-2020 |
Nikita Popov |
Support visibility modifiers in namespaced names Fixes #704.
|