Skip to content

fix: parse keyword identifiers in expressions and constants - #307

Open
calebdw wants to merge 3 commits into
masterfrom
calebdw/push-yxztyvnwyxxl
Open

calebdw wants to merge 3 commits into
masterfrom
calebdw/push-yxztyvnwyxxl

Conversation

@calebdw

@calebdw calebdw commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Closes #295

Accept cast keywords as expression names so argument values can continue
into scoped calls and compound expressions. Keep class-name aliases
limited to cast spellings that PHP permits as class identifiers.

Accept type keywords in valid global and class constant declarations,
with coverage for reserved names, typed constants, casts, and named
arguments. Restore example parsing for the affected WordPress file.

Fixes #295.
Regenerate both PHP parsers for keyword identifier and constant fixes.
@calebdw
calebdw requested a review from cfroystad October 8, 2026 15:48
Prepare the keyword identifier and constant parsing fixes for release.
Keep package manifests, lockfiles, and parser metadata in sync.

This branch has not been deployed

No deployments
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.

bug: constant declarations with names matching certain reserved words result in parsing errors

1 participant