}
setValue(value, { property, itemIndex }) {
this.value = value;
- this.scopePath = code_1._ `.${new code_1.Name(property)}[${itemIndex}]`;
+ this.scopePath = (0, code_1._) `.${new code_1.Name(property)}[${itemIndex}]`;
}
}
exports.ValueScopeName = ValueScopeName;
-const line = code_1._ `\n`;
+const line = (0, code_1._) `\n`;
class ValueScope extends Scope {
constructor(opts) {
super(opts);
return this._reduceValues(values, (name) => {
if (name.scopePath === undefined)
throw new Error(`CodeGen: name "${name}" has no value`);
- return code_1._ `${scopeName}${name.scopePath}`;
+ return (0, code_1._) `${scopeName}${name.scopePath}`;
});
}
scopeCode(values = this._values, usedValues, getCode) {
let c = valueCode(name);
if (c) {
const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;
- code = code_1._ `${code}${def} ${name} = ${c};${this.opts._n}`;
+ code = (0, code_1._) `${code}${def} ${name} = ${c};${this.opts._n}`;
}
else if ((c = getCode === null || getCode === void 0 ? void 0 : getCode(name))) {
- code = code_1._ `${code}${c}${this.opts._n}`;
+ code = (0, code_1._) `${code}${c}${this.opts._n}`;
}
else {
throw new ValueError(name);