UNPKG

antlr-ng

Version:

Next generation ANTLR Tool

24 lines (23 loc) 848 B
var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); import { LL1Loop } from "./LL1Loop.js"; class LL1PlusBlockSingleAlt extends LL1Loop { static { __name(this, "LL1PlusBlockSingleAlt"); } constructor(factory, plusRoot, alts) { super(factory, plusRoot, alts); const blkAST = plusRoot.children[0]; const blkStart = blkAST.atnState; this.stateNumber = blkStart.loopBackState.stateNumber; this.blockStartStateNumber = blkStart.stateNumber; const plus = blkAST.atnState; this.decision = plus.loopBackState.decision; const altLookSets = factory.g.decisionLookahead[this.decision]; const loopBackLook = altLookSets[0]; this.loopExpr = this.addCodeForLoopLookaheadTempVar(loopBackLook); } } export { LL1PlusBlockSingleAlt };