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

Fix missing export of TokenStreamRewriter #4529

Merged
merged 1 commit into from
Feb 18, 2024

Conversation

weilence
Copy link
Contributor

No description provided.

@ericvergnaud
Copy link
Contributor

Hi,
thanks so much for this!
However it seems to be missing the TS api ?

@weilence
Copy link
Contributor Author

Yes, the d.ts file exports this API, but in reality, it cannot be used. For example:

import { TokenStreamRewriter } from 'antlr4';

Directly using TokenStreamRewriter results in it being undefined, although the d.ts file appears to be normal.
You must use it like this:

import antlr4 from 'antlr4';
antlr4.TokenStreamRewriter

@ericvergnaud
Copy link
Contributor

So the purpose of this PR is to fix this issue ? Should it be named "Fix missing export of TokenStreamRewriter" ?

@weilence weilence changed the title Provide JavaScript port of TokenStreamRewriter Fix missing export of TokenStreamRewriter Feb 18, 2024
@weilence
Copy link
Contributor Author

Yes

@ericvergnaud ericvergnaud merged commit 8127454 into antlr:dev Feb 18, 2024
39 of 42 checks passed
@ericvergnaud
Copy link
Contributor

Thanks!

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