greybel-interpreter 1.8.0 → 1.8.2
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.d.ts +1 -0
- package/dist/context.js +8 -5
- package/package.json +1 -1
package/dist/context.d.ts
CHANGED
|
@@ -95,6 +95,7 @@ export declare class OperationContext {
|
|
|
95
95
|
private static readonly lookupGlobalsType;
|
|
96
96
|
private static readonly lookupLocalsType;
|
|
97
97
|
constructor(options?: ContextOptions);
|
|
98
|
+
isIgnoredInDebugging(op: Operation): boolean;
|
|
98
99
|
step(op: Operation): Promise<CustomValue>;
|
|
99
100
|
setLastActive(ctx: OperationContext): OperationContext;
|
|
100
101
|
getLastActive(): OperationContext;
|
package/dist/context.js
CHANGED
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.OperationContext = exports.FunctionState = exports.LoopState = exports.ProcessState = exports.Debugger = exports.Scope = exports.ContextState = exports.ContextType = void 0;
|
|
13
13
|
const handler_container_1 = require("./handler-container");
|
|
14
|
+
const noop_1 = require("./operations/noop");
|
|
14
15
|
const operation_1 = require("./operations/operation");
|
|
15
16
|
const base_1 = require("./types/base");
|
|
16
17
|
const default_1 = require("./types/default");
|
|
@@ -158,11 +159,15 @@ class OperationContext {
|
|
|
158
159
|
this.globals = this.lookupGlobals();
|
|
159
160
|
this.locals = this.lookupLocals() || this;
|
|
160
161
|
}
|
|
162
|
+
isIgnoredInDebugging(op) {
|
|
163
|
+
return op instanceof operation_1.OperationBlock || op instanceof noop_1.Noop;
|
|
164
|
+
}
|
|
161
165
|
step(op) {
|
|
162
166
|
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
-
if (
|
|
164
|
-
|
|
167
|
+
if (this.isIgnoredInDebugging(op)) {
|
|
168
|
+
return op.handle(this);
|
|
165
169
|
}
|
|
170
|
+
this.stackTrace.unshift(op);
|
|
166
171
|
if (!this.injected) {
|
|
167
172
|
this.target = op.target || this.target;
|
|
168
173
|
this.setLastActive(this);
|
|
@@ -172,9 +177,7 @@ class OperationContext {
|
|
|
172
177
|
}
|
|
173
178
|
}
|
|
174
179
|
const result = yield op.handle(this);
|
|
175
|
-
|
|
176
|
-
this.stackTrace.shift();
|
|
177
|
-
}
|
|
180
|
+
this.stackTrace.shift();
|
|
178
181
|
return result;
|
|
179
182
|
});
|
|
180
183
|
}
|