UNPKG

simc-ast-builder

Version:

Parser and AST generator for SimulationCraft files

20 lines 614 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.handleNumberExpr = void 0; const SimCVisitorError_1 = require("../../errors/SimCVisitorError"); /** * Handler for number expression contexts */ const handleNumberExpr = (ctx, visitor) => { if (!ctx.text) { throw new SimCVisitorError_1.SimCVisitorError("Empty number text", ctx); } return { expressionType: "numeric", kind: "expression", nodeType: "literal", value: ctx.text, }; }; exports.handleNumberExpr = handleNumberExpr; //# sourceMappingURL=NumberExprHandler.js.map