#
05ed7959 |
| 18-Nov-2024 |
Jorg Sowa |
Removed unrecheable statement
|
#
cde9bab3 |
| 01-Sep-2024 |
Nikita Popov |
Add support for PHP 8.4 exit function For backwards-compatibility, parse the simple single argument case into an Exit_ node as previously. For more complex expressions generate a fun
Add support for PHP 8.4 exit function For backwards-compatibility, parse the simple single argument case into an Exit_ node as previously. For more complex expressions generate a function call.
show more ...
|
#
03caf4cc |
| 14-Jul-2024 |
Nikita Popov |
[8.4] Add support for property hooks Add hooks subnode to Stmt\Property and Param, which contains an array of PropertyHook. The property hook support is considered experimental
[8.4] Add support for property hooks Add hooks subnode to Stmt\Property and Param, which contains an array of PropertyHook. The property hook support is considered experimental and subject to change. RFC: https://wiki.php.net/rfc/property-hooks
show more ...
|
#
3beee6ec |
| 28-Jul-2024 |
Nikita Popov |
Add Modifiers::toString() helper Convert an integer modifier into a string.
|
#
58de4791 |
| 21-Jul-2024 |
Nikita Popov |
Remove error for abstract/final properties These are allowed since PHP 8.4, with the introduction of property hooks. (Abstract properties require hooks, which is not validated here.)
|
#
fadccead |
| 14-Jul-2024 |
Nikita Popov |
Avoid compatibilty token list in parser Create the mapping using the entries in symbolToName, so we don't need to repeat the compatibility tokens in another place.
|
#
d8235a27 |
| 14-Jul-2024 |
Nikita Popov |
[8.4] Add support for __PROPERTY__ magic constant Part of property hooks RFC.
|
#
af14fdb2 |
| 21-Feb-2024 |
Nikita Popov |
Avoid cyclic reference in parser Pass $this as an explicit $self argument to the reduce callbacks, so we can make them static. This avoids a circular reference in the parser, so that
Avoid cyclic reference in parser Pass $this as an explicit $self argument to the reduce callbacks, so we can make them static. This avoids a circular reference in the parser, so that it can be immediately destroyed when it goes out of scope. Fixes #980.
show more ...
|
#
acfccd9d |
| 01-Nov-2023 |
Nikita Popov |
Run with updated php-cs-fixer
|
#
4e27a17c |
| 06-Jun-2022 |
Nikita Popov |
Use visitor to assign comments This fixes the long-standing issue where a comment would get assigned to all nodes with the same starting position, instead of only the outer-most one.
Use visitor to assign comments This fixes the long-standing issue where a comment would get assigned to all nodes with the same starting position, instead of only the outer-most one. Fixes #253.
show more ...
|
#
f5adbb5e |
| 24-Sep-2023 |
Nikita Popov |
Add rawValue to InterpolatedStringPart and doc strings For doc strings, the rawValue (on either the String_ or InterpolatedStringPrts) does not include the leading indentation (which
Add rawValue to InterpolatedStringPart and doc strings For doc strings, the rawValue (on either the String_ or InterpolatedStringPrts) does not include the leading indentation (which is available as docIndentation) or the trailing newline on the last part.
show more ...
|
#
ab51e9d3 |
| 17-Sep-2023 |
Nikita Popov |
Remove superfluous phpdoc tags These just specify a type that is already specified as a real PHP type.
|
#
2d3dd4e2 |
| 17-Sep-2023 |
Nikita Popov |
Don't align phpdoc tags I did this to start with, but then alignment kept being broken during refactorings, and at some point I switched to not aligning, and now we have a big mess.
Don't align phpdoc tags I did this to start with, but then alignment kept being broken during refactorings, and at some point I switched to not aligning, and now we have a big mess. Add a php-cs-fixer rule to consistently not align phpdoc tags.
show more ...
|
#
ea778075 |
| 17-Aug-2023 |
Nikita Popov |
Add more property types Some of these are not maximally accurate due to lack of union types.
|
#
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.
|
#
62853b17 |
| 13-Aug-2023 |
Nikita Popov |
Fix PhpStan errors
|
#
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 ...
|
#
b20267c5 |
| 09-Jul-2023 |
Nikita Popov |
Make use of default actions For the default action $$ = $1, save the closure invocation.
|
#
c62dda95 |
| 01-Mar-2023 |
Nikita Popov |
Strip trailing doc string newline before parsing escape sequences If the doc string ends on an escaped \r, it should not get eaten as the "last newline".
|
#
f98341f6 |
| 17-Sep-2022 |
Nikita Popov |
Specify more types
|
#
032b1021 |
| 11-Sep-2022 |
Nikita Popov |
Remove deprecated Error constructor And use this chance to provide accurate position information for namespace errors.
|
#
a099803d |
| 11-Sep-2022 |
Nikita Popov |
Use array<string, mixed> type for $attributes Slightly more accurate, and stops PHPStan from complaining about the missing array type information.
|
#
48f470ea |
| 11-Sep-2022 |
Nikita Popov |
Add missing return types
|
#
9b46dffb |
| 11-Sep-2022 |
Nikita Popov |
Fix formatting preservation for alternative elseif/else syntax Test taken from PR #797.
|