UNPKG

antlr-ng

Version:

Next generation ANTLR Tool

33 lines (32 loc) 696 B
var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); import { GrammarAST } from "./GrammarAST.js"; class StarBlockAST extends GrammarAST { static { __name(this, "StarBlockAST"); } greedy; constructor(...args) { if (typeof args[0] === "number") { const [type, t, greedy] = args; super(type, t); this.greedy = greedy; } else { const [node] = args; super(node); this.greedy = node.greedy; } } isGreedy() { return this.greedy; } dupNode() { return new StarBlockAST(this); } visit(v) { return v.visit(this); } } export { StarBlockAST };