Open queenlixiaoman opened 3 years ago
$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?
$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?