UNPKG

ts-fusion-parser

Version:

Parser for Neos Fusion Files

18 lines (17 loc) 826 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ObjectOffsetAccessPathNode = void 0; const AbstractNode_1 = require("../../../common/AbstractNode"); const ObjectPathNode_1 = require("./ObjectPathNode"); class ObjectOffsetAccessPathNode extends ObjectPathNode_1.ObjectPathNode { constructor(expression, position, offset = undefined) { super('', position, undefined, offset); this.expression = expression; AbstractNode_1.AbstractNode.setParentOfNode(this.expression, this); } toString(intend) { var _a, _b; return `[${this.expression.toString()}]` + ((_b = (_a = this.offset) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ''); } } exports.ObjectOffsetAccessPathNode = ObjectOffsetAccessPathNode;