antlr-ng
Version:
Next generation ANTLR Tool
41 lines (40 loc) • 842 B
JavaScript
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
import { GrammarAST } from "./GrammarAST.js";
class PlusBlockAST extends GrammarAST {
static {
__name(this, "PlusBlockAST");
}
greedy;
constructor(...args) {
switch (args.length) {
case 1: {
const [node] = args;
super(node);
this.greedy = node.greedy;
break;
}
case 3: {
const [type, t, greedy] = args;
super(type, t);
this.greedy = greedy;
break;
}
default: {
throw new Error("Invalid number of arguments");
}
}
}
isGreedy() {
return this.greedy;
}
dupNode() {
return new PlusBlockAST(this);
}
visit(v) {
return v.visit(this);
}
}
export {
PlusBlockAST
};