"TypeError: Class constructor Lexer cannot be invoked without 'new'"
queenlixiaoman opened this issue · 0 comments
queenlixiaoman commented
$antlr4 -Dlanguage=JavaScript SplParser.g4
Generate file:SplParserLexer.js.
In SplParserLexer.js codes:
function SplParserLexer(input) {
antlr4.Lexer.call(this, input);
this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());
return this;
}
Browser error:"TypeError: Class constructor Lexer cannot be invoked without 'new'"
How to solve it,please?