UNPKG

simc-ast-builder

Version:

Parser and AST generator for SimulationCraft files

20 lines 673 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.handleSpellTargets = void 0; const SimCVisitorError_1 = require("../../errors/SimCVisitorError"); /** * Handler for spell_targets access contexts */ const handleSpellTargets = ({ ctx, parts, }) => { if (parts.length < 2) { throw new SimCVisitorError_1.SimCVisitorError("Spell targets access requires a spell name", ctx); } return { actionName: parts[1], expressionType: "numeric", kind: "expression", nodeType: "spell_targets", }; }; exports.handleSpellTargets = handleSpellTargets; //# sourceMappingURL=SpellTargetsHandler.js.map