ts-fusion-parser
Version:
Parser for Neos Fusion Files
20 lines (19 loc) • 894 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ObjectFunctionPathNode = void 0;
const AbstractNode_1 = require("../../../common/AbstractNode");
const ObjectPathNode_1 = require("./ObjectPathNode");
class ObjectFunctionPathNode extends ObjectPathNode_1.ObjectPathNode {
constructor(value, args, position, parent = undefined, offset = undefined) {
super(value, position, parent, offset);
this.args = args;
for (const arg of this.args) {
AbstractNode_1.AbstractNode.setParentOfNode(arg, this);
}
}
toString(intend) {
var _a, _b;
return `${this.value}(${this.args.map(arg => arg.toString()).join(", ")})` + ((_b = (_a = this.offset) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '');
}
}
exports.ObjectFunctionPathNode = ObjectFunctionPathNode;