UNPKG

antlr-ng

Version:

Next generation ANTLR Tool

18 lines (17 loc) 556 B
import { CommonToken, type Token } from "antlr4ng"; import { Grammar } from "../tool/Grammar.js"; /** * A CommonToken that can also track it's original location, * derived from options on the element ref like BEGIN<line=34,..>. */ export declare class GrammarToken extends CommonToken { g: Grammar; originalTokenIndex: number; constructor(g: Grammar, oldToken: Token); getCharPositionInLine(): number; getLine(): number; getTokenIndex(): number; getStartIndex(): number; getStopIndex(): number; toString(): string; }