antlr-ng
Version:
Next generation ANTLR Tool
27 lines (26 loc) • 603 B
JavaScript
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
import { GrammarASTWithOptions } from "./GrammarASTWithOptions.js";
class TerminalAST extends GrammarASTWithOptions {
static {
__name(this, "TerminalAST");
}
constructor(...args) {
if (typeof args[0] === "number") {
const [type, t] = args;
super(type, t);
} else {
const [node] = args;
super(node);
}
}
dupNode() {
return new TerminalAST(this);
}
visit(v) {
return v.visit(this);
}
}
export {
TerminalAST
};