UNPKG

antlr-ng

Version:

Next generation ANTLR Tool

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