greybel-interpreter 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/expressions/assign.js +1 -1
- package/dist/expressions/binary-negated-expression.js +1 -1
- package/dist/expressions/call.js +16 -11
- package/dist/expressions/import.js +1 -1
- package/dist/expressions/include.js +1 -1
- package/dist/expressions/list.js +1 -1
- package/dist/expressions/logical-and-binary.js +1 -1
- package/dist/expressions/map.js +1 -1
- package/dist/expressions/path.js +1 -1
- package/package.json +1 -1
|
@@ -162,7 +162,7 @@ var AssignExpression = /** @class */ (function (_super) {
|
|
|
162
162
|
});
|
|
163
163
|
});
|
|
164
164
|
};
|
|
165
|
-
operationContext.debugger.debug('Line', me.ast.line, 'AssignExpression', 'get', 'expr', me.expr);
|
|
165
|
+
operationContext.debugger.debug('Line', me.ast.start.line, 'AssignExpression', 'get', 'expr', me.expr);
|
|
166
166
|
return [4 /*yield*/, evaluate(me.expr)];
|
|
167
167
|
case 1: return [2 /*return*/, _a.sent()];
|
|
168
168
|
}
|
|
@@ -123,7 +123,7 @@ var BinaryNegatedExpression = /** @class */ (function (_super) {
|
|
|
123
123
|
});
|
|
124
124
|
});
|
|
125
125
|
};
|
|
126
|
-
operationContext.debugger.debug('Line', me.ast.line, 'BinaryNegatedExpression', 'get', 'expr', me.expr);
|
|
126
|
+
operationContext.debugger.debug('Line', me.ast.start.line, 'BinaryNegatedExpression', 'get', 'expr', me.expr);
|
|
127
127
|
return evaluate(me.expr);
|
|
128
128
|
};
|
|
129
129
|
return BinaryNegatedExpression;
|
package/dist/expressions/call.js
CHANGED
|
@@ -121,19 +121,24 @@ var CallExpression = /** @class */ (function (_super) {
|
|
|
121
121
|
me = this;
|
|
122
122
|
buildExpression = function (node) {
|
|
123
123
|
return __awaiter(this, void 0, void 0, function () {
|
|
124
|
-
var _a, _b;
|
|
125
|
-
return __generator(this, function (
|
|
126
|
-
switch (
|
|
124
|
+
var _a, _b, _c;
|
|
125
|
+
return __generator(this, function (_d) {
|
|
126
|
+
switch (_d.label) {
|
|
127
127
|
case 0:
|
|
128
|
-
if (greyscript_core_1.ASTType.CallStatement === node.type)
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
if (!(greyscript_core_1.ASTType.CallStatement === node.type)) return [3 /*break*/, 1];
|
|
129
|
+
return [2 /*return*/, buildExpression(node.expression)];
|
|
130
|
+
case 1:
|
|
131
|
+
if (!(greyscript_core_1.ASTType.Identifier === node.type)) return [3 /*break*/, 3];
|
|
131
132
|
_a = ExpressionSegment.bind;
|
|
133
|
+
return [4 /*yield*/, visit(node)];
|
|
134
|
+
case 2: return [2 /*return*/, new (_a.apply(ExpressionSegment, [void 0, _d.sent(), []]))()];
|
|
135
|
+
case 3:
|
|
136
|
+
_b = ExpressionSegment.bind;
|
|
132
137
|
return [4 /*yield*/, visit(node.base)];
|
|
133
|
-
case
|
|
134
|
-
|
|
138
|
+
case 4:
|
|
139
|
+
_c = [void 0, _d.sent()];
|
|
135
140
|
return [4 /*yield*/, Promise.all(node.arguments.map(function (item) { return visit(item); }))];
|
|
136
|
-
case
|
|
141
|
+
case 5: return [2 /*return*/, new (_b.apply(ExpressionSegment, _c.concat([_d.sent()])))()];
|
|
137
142
|
}
|
|
138
143
|
});
|
|
139
144
|
});
|
|
@@ -169,7 +174,7 @@ var CallExpression = /** @class */ (function (_super) {
|
|
|
169
174
|
return [4 /*yield*/, node.path.get(opc, me.expr)];
|
|
170
175
|
case 2:
|
|
171
176
|
pathExpr = _f.sent();
|
|
172
|
-
operationContext.debugger.debug('Line', me.ast.line, 'CallExpression', 'pathExpr', pathExpr);
|
|
177
|
+
operationContext.debugger.debug('Line', me.ast.start.line, 'CallExpression', 'pathExpr', pathExpr);
|
|
173
178
|
if (!pathExpr.handle) return [3 /*break*/, 8];
|
|
174
179
|
if (!(0, typer_1.isCustomMap)(pathExpr.handle)) return [3 /*break*/, 7];
|
|
175
180
|
return [4 /*yield*/, pathExpr.handle.getCallable(pathExpr.path)];
|
|
@@ -203,7 +208,7 @@ var CallExpression = /** @class */ (function (_super) {
|
|
|
203
208
|
});
|
|
204
209
|
});
|
|
205
210
|
};
|
|
206
|
-
operationContext.debugger.debug('Line', me.ast.line, 'CallExpression', 'get', 'expr', me.expr);
|
|
211
|
+
operationContext.debugger.debug('Line', me.ast.start.line, 'CallExpression', 'get', 'expr', me.expr);
|
|
207
212
|
return evaluate(me.expr);
|
|
208
213
|
};
|
|
209
214
|
return CallExpression;
|
|
@@ -143,7 +143,7 @@ var ImportExpression = /** @class */ (function (_super) {
|
|
|
143
143
|
});
|
|
144
144
|
});
|
|
145
145
|
};
|
|
146
|
-
operationContext.debugger.debug('Line', me.ast.line, 'ImportExpression', 'get', 'expr', me.expr);
|
|
146
|
+
operationContext.debugger.debug('Line', me.ast.start.line, 'ImportExpression', 'get', 'expr', me.expr);
|
|
147
147
|
return [4 /*yield*/, evaluate(me.expr)];
|
|
148
148
|
case 1: return [2 /*return*/, _a.sent()];
|
|
149
149
|
}
|
|
@@ -120,7 +120,7 @@ var IncludeExpression = /** @class */ (function (_super) {
|
|
|
120
120
|
});
|
|
121
121
|
});
|
|
122
122
|
};
|
|
123
|
-
operationContext.debugger.debug('Line', me.ast.line, 'IncludeExpression', 'get', 'expr', me.expr);
|
|
123
|
+
operationContext.debugger.debug('Line', me.ast.start.line, 'IncludeExpression', 'get', 'expr', me.expr);
|
|
124
124
|
return [4 /*yield*/, evaluate(me.expr)];
|
|
125
125
|
case 1: return [2 /*return*/, _a.sent()];
|
|
126
126
|
}
|
package/dist/expressions/list.js
CHANGED
|
@@ -126,7 +126,7 @@ var ListExpression = /** @class */ (function (_super) {
|
|
|
126
126
|
});
|
|
127
127
|
});
|
|
128
128
|
};
|
|
129
|
-
operationContext.debugger.debug('Line', me.ast.line, 'ListExpression', 'get', 'expr', me.expr);
|
|
129
|
+
operationContext.debugger.debug('Line', me.ast.start.line, 'ListExpression', 'get', 'expr', me.expr);
|
|
130
130
|
return evaluate(me.expr.values);
|
|
131
131
|
};
|
|
132
132
|
return ListExpression;
|
|
@@ -204,7 +204,7 @@ var LogicalAndBinaryExpression = /** @class */ (function (_super) {
|
|
|
204
204
|
}
|
|
205
205
|
});
|
|
206
206
|
}); };
|
|
207
|
-
operationContext.debugger.debug('Line', me.ast.line, 'LogicalAndBinaryExpression', 'get', 'expr', me.expr);
|
|
207
|
+
operationContext.debugger.debug('Line', me.ast.start.line, 'LogicalAndBinaryExpression', 'get', 'expr', me.expr);
|
|
208
208
|
return evaluate(me.expr);
|
|
209
209
|
};
|
|
210
210
|
return LogicalAndBinaryExpression;
|
package/dist/expressions/map.js
CHANGED
|
@@ -188,7 +188,7 @@ var MapExpression = /** @class */ (function (_super) {
|
|
|
188
188
|
});
|
|
189
189
|
});
|
|
190
190
|
};
|
|
191
|
-
operationContext.debugger.debug('Line', me.ast.line, 'MapExpression', 'get', 'expr', me.expr);
|
|
191
|
+
operationContext.debugger.debug('Line', me.ast.start.line, 'MapExpression', 'get', 'expr', me.expr);
|
|
192
192
|
return evaluate(me.expr.values);
|
|
193
193
|
};
|
|
194
194
|
return MapExpression;
|
package/dist/expressions/path.js
CHANGED
|
@@ -315,7 +315,7 @@ var PathExpression = /** @class */ (function (_super) {
|
|
|
315
315
|
});
|
|
316
316
|
});
|
|
317
317
|
};
|
|
318
|
-
operationContext.debugger.debug('Line', me.ast.line, 'PathExpression', 'get', 'expr', me.expr);
|
|
318
|
+
operationContext.debugger.debug('Line', me.ast.start.line, 'PathExpression', 'get', 'expr', me.expr);
|
|
319
319
|
return [4 /*yield*/, evaluate(me.expr)];
|
|
320
320
|
case 1:
|
|
321
321
|
resultExpr = _c.sent();
|