Skip to content

[JavaScript-runtime] Add getInvokingContext to Parser.d.ts #4856

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

Merged
merged 2 commits into from
Jun 26, 2025

Conversation

dudemaga
Copy link
Contributor

When using non-local attribute references in the grammar (ex: {$ruleName::MyAttribute}?), the target generates code that uses the getInvokingContext function in the parser. However, currently the function is not in the Parser type definition. This causes issues when using the runtime in a Typescript project.

This PR just adds the function to the Parser type definition as it is used in the code generation.

Signed-off-by: dudemaga <[email protected]>
@dudemaga dudemaga changed the title [JavaScript Target] Add getInvokingContext to Parser.d.ts [JavaScript-runtime] Add getInvokingContext to Parser.d.ts Jun 25, 2025
@ericvergnaud
Copy link
Contributor

@dudemaga can you touch this PR in order to re-run the CI ?

@ericvergnaud
Copy link
Contributor

@parrt blessed

@parrt parrt merged commit 6a15cc3 into antlr:dev Jun 26, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants