Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support parsing php 8.3 typed class constants #406

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

TysonAndre
Copy link
Contributor

https://wiki.php.net/rfc/typed_class_constants#inheritance_and_variance As of php 8.3, class constants can have the same types as parameters (including union, intersection, and DNF types)

Start testing with php 8.3

https://wiki.php.net/rfc/typed_class_constants#inheritance_and_variance
As of php 8.3, class constants can have the same types as parameters
(including union, intersection, and DNF types)

Start testing with php 8.3
@TysonAndre
Copy link
Contributor Author

TysonAndre commented Dec 26, 2023

-<ST_IN_SCRIPTING>"yield"{WHITESPACE}"from"[^a-zA-Z0-9_\x80-\xff] {
+<ST_IN_SCRIPTING>"yield"{WHITESPACE_OR_COMMENTS}"from"[^a-zA-Z0-9_\x80-\xff] {
        yyless(yyleng - 1);
        HANDLE_NEWLINES(yytext, yyleng);
        RETURN_TOKEN_WITH_IDENT(T_YIELD_FROM);

tests/cases/lexical/keyword5.php.tokens started failing in php 8.3 because php now lexes yield /*awesome*/ from as T_YIELD_FROM

@TysonAndre
Copy link
Contributor Author

The tests won't run until https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks

1 workflow awaiting approval
This workflow requires approval from a maintainer. Learn more about approving workflows.
1 in progress and 1 successful checks

Assume most class constants won't add a type
and parse the name if ambiguous.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants