antlr-ng
Version:
Next generation ANTLR Tool
22 lines (21 loc) • 971 B
TypeScript
import { Token } from "antlr4ng";
import { type ILeftRecursiveRuleAltInfo } from "../../analysis/ILeftRecursiveRuleAltInfo.js";
import { type Alternative } from "../Alternative.js";
import { type GrammarAST } from "./GrammarAST.js";
import { type IGrammarASTVisitor } from "./IGrammarASTVisitor.js";
import { GrammarASTWithOptions } from "./GrammarASTWithOptions.js";
/** Any ALT (which can be child of ALT_REWRITE node) */
export declare class AltAST extends GrammarASTWithOptions {
readonly astType: string;
alt: Alternative;
/** If we transformed this alt from a left-recursive one, need info on it */
leftRecursiveAltInfo?: ILeftRecursiveRuleAltInfo;
/**
* If someone specified an outermost alternative label with #foo. Token type will be ID.
*/
altLabel?: GrammarAST;
constructor(node: AltAST | Token);
constructor(type: number, t?: Token, text?: string);
dupNode(): AltAST;
visit<T>(v: IGrammarASTVisitor<T>): T;
}