diff --git a/runtime/JavaScript/src/antlr4/Lexer.d.ts b/runtime/JavaScript/src/antlr4/Lexer.d.ts index fe32aa7b4f..e87527e9e9 100644 --- a/runtime/JavaScript/src/antlr4/Lexer.d.ts +++ b/runtime/JavaScript/src/antlr4/Lexer.d.ts @@ -22,7 +22,9 @@ export declare class Lexer extends Recognizer { nextToken(): Token; skip(): void; more(): void; - more(m: number): void; + mode(m: number): void; + getMode(): number; + getModeStack(): number[]; pushMode(m: number): void; popMode(): number; emitToken(token: Token): void; diff --git a/runtime/JavaScript/src/antlr4/Lexer.js b/runtime/JavaScript/src/antlr4/Lexer.js index 8ff0a89a53..d585b116d8 100644 --- a/runtime/JavaScript/src/antlr4/Lexer.js +++ b/runtime/JavaScript/src/antlr4/Lexer.js @@ -173,6 +173,14 @@ export default class Lexer extends Recognizer { this._mode = m; } + getMode() { + return this._mode; + } + + getModeStack() { + return this._modeStack; + } + pushMode(m) { if (this._interp.debug) { console.log("pushMode " + m); diff --git a/runtime/JavaScript/src/antlr4/Recognizer.d.ts b/runtime/JavaScript/src/antlr4/Recognizer.d.ts index d77927c9a2..a01343c121 100644 --- a/runtime/JavaScript/src/antlr4/Recognizer.d.ts +++ b/runtime/JavaScript/src/antlr4/Recognizer.d.ts @@ -6,4 +6,7 @@ export declare class Recognizer { removeErrorListeners(): void; addErrorListener(listener: ErrorListener): void; + getErrorListenerDispatch(): ErrorListener; + getLiteralNames(): string[] | []; + getSymbolicNames(): string[] | []; } diff --git a/runtime/JavaScript/src/antlr4/Token.d.ts b/runtime/JavaScript/src/antlr4/Token.d.ts index 87fb12d1f5..7a8e5b70a5 100644 --- a/runtime/JavaScript/src/antlr4/Token.d.ts +++ b/runtime/JavaScript/src/antlr4/Token.d.ts @@ -1,9 +1,10 @@ -import {CharStream} from "./CharStream"; +import { TokenSource } from "./TokenSource"; +import { CharStream } from "./CharStream"; export declare class Token { + static INVALID_TYPE: number; static EOF: number; - static DEFAULT_CHANNEL: number; static HIDDEN_CHANNEL: number; @@ -18,5 +19,6 @@ export declare class Token { clone(): Token; cloneWithType(type: number): Token; + getTokenSource(): TokenSource; getInputStream(): CharStream; }