We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Antlr 4.13.2 generates from a lexer grammar a typescript lexer which imports 'DecisionState':
import { ATN, ATNDeserializer, CharStream, DecisionState, DFA, Lexer, LexerATNSimulator, RuleContext, PredictionContextCache, Token } from "antlr4";
But the antlr4 node-module (version 4.13.2) does not export 'DecisionState'. This can be verified by executing a small javascript:
import * as antlr4 from 'antlr4'; console.log(Object.keys(antlr4));
The output does not contain 'DecisionState'.
Because DecisionState is only used as type decleration in
DecisionState
static DecisionsToDFA = CalcLexer._ATN.decisionToState.map( (ds: DecisionState, index: number) => new DFA(ds, index) );
it can be simply removed from the typescript lexer file by executing a post processor.
This issue could be fixed either by exporting 'DecisionState' in the antlr4 node-module or removing the explicit usage in the generated lexer file.
The text was updated successfully, but these errors were encountered:
Same for parser. Here are the exports for 'TokenStream' and 'DecisionState' both missed.
Sorry, something went wrong.
No branches or pull requests
Bug
Antlr 4.13.2 generates from a lexer grammar a typescript lexer which imports 'DecisionState':
But the antlr4 node-module (version 4.13.2) does not export 'DecisionState'. This can be verified by executing a small javascript:
The output does not contain 'DecisionState'.
Workaround
Because
DecisionState
is only used as type decleration init can be simply removed from the typescript lexer file by executing a post processor.
Suggestion for a Fix
This issue could be fixed either by exporting 'DecisionState' in the antlr4 node-module or removing the explicit usage in the generated lexer file.
The text was updated successfully, but these errors were encountered: