greybel-interpreter 0.5.6 → 0.5.7
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/context.js +10 -1
- package/package.json +1 -1
package/dist/context.js
CHANGED
|
@@ -114,6 +114,9 @@ var Scope = /** @class */ (function (_super) {
|
|
|
114
114
|
else if (me.value.has(current)) {
|
|
115
115
|
return _super.prototype.get.call(this, path);
|
|
116
116
|
}
|
|
117
|
+
else if (me.context.previous) {
|
|
118
|
+
return map_1.default.prototype.get.call(me.context.previous.scope, path);
|
|
119
|
+
}
|
|
117
120
|
else {
|
|
118
121
|
throw new Error("Cannot get path ".concat(path.join('.')));
|
|
119
122
|
}
|
|
@@ -141,9 +144,15 @@ var Scope = /** @class */ (function (_super) {
|
|
|
141
144
|
else if ((_c = me.context.api) === null || _c === void 0 ? void 0 : _c.value.has(current)) {
|
|
142
145
|
return map_1.default.prototype.getCallable.call(me.context.api, path);
|
|
143
146
|
}
|
|
144
|
-
else {
|
|
147
|
+
else if (me.value.has(current)) {
|
|
145
148
|
return _super.prototype.getCallable.call(this, path);
|
|
146
149
|
}
|
|
150
|
+
else if (me.context.previous) {
|
|
151
|
+
return map_1.default.prototype.getCallable.call(me.context.previous.scope, path);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
throw new Error("Cannot get callable path ".concat(path.join('.')));
|
|
155
|
+
}
|
|
147
156
|
}
|
|
148
157
|
return Promise.resolve({
|
|
149
158
|
origin: me,
|