greybel-interpreter 0.2.2 → 0.2.3
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 +2 -1
- package/dist/context.js +3 -2
- package/dist/operations/body.js +2 -1
- package/package.json +1 -1
package/dist/context.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export declare class Debugger {
|
|
|
34
34
|
raise(message: string, ...args: any[]): void;
|
|
35
35
|
debug(message: string, ...args: any[]): void;
|
|
36
36
|
setBreakpoint(state: boolean): Debugger;
|
|
37
|
-
getBreakpoint(): boolean;
|
|
37
|
+
getBreakpoint(operationContext: OperationContext): boolean;
|
|
38
38
|
next(): Debugger;
|
|
39
39
|
resume(): Promise<void>;
|
|
40
40
|
interact(operationContext: OperationContext, item: Operation | Expression): void;
|
|
@@ -60,6 +60,7 @@ export interface OperationContextForkOptions {
|
|
|
60
60
|
}
|
|
61
61
|
export declare class OperationContext {
|
|
62
62
|
target: string;
|
|
63
|
+
line: number;
|
|
63
64
|
debugger: Debugger;
|
|
64
65
|
previous: OperationContext | null;
|
|
65
66
|
type: string;
|
package/dist/context.js
CHANGED
|
@@ -236,8 +236,8 @@ var Debugger = /** @class */ (function () {
|
|
|
236
236
|
me.breakpoint = state;
|
|
237
237
|
return me;
|
|
238
238
|
};
|
|
239
|
-
Debugger.prototype.getBreakpoint = function () {
|
|
240
|
-
return this.breakpoint;
|
|
239
|
+
Debugger.prototype.getBreakpoint = function (operationContext) {
|
|
240
|
+
return operationContext.type !== ContextType.INJECTION && this.breakpoint;
|
|
241
241
|
};
|
|
242
242
|
Debugger.prototype.next = function () {
|
|
243
243
|
var me = this;
|
|
@@ -311,6 +311,7 @@ var OperationContext = /** @class */ (function () {
|
|
|
311
311
|
function OperationContext(options) {
|
|
312
312
|
var me = this;
|
|
313
313
|
me.target = options.target || 'unknown';
|
|
314
|
+
me.line = -1;
|
|
314
315
|
me.previous = options.previous || null;
|
|
315
316
|
me.type = options.type || ContextType.API;
|
|
316
317
|
me.state = options.state || ContextState.DEFAULT;
|
package/dist/operations/body.js
CHANGED
|
@@ -100,7 +100,8 @@ var BodyOperation = /** @class */ (function (_super) {
|
|
|
100
100
|
case 2:
|
|
101
101
|
if (!!_b.done) return [3 /*break*/, 10];
|
|
102
102
|
entity = _b.value;
|
|
103
|
-
|
|
103
|
+
operationContext.line = entity.ast.line;
|
|
104
|
+
if (!dbgr.getBreakpoint(operationContext)) return [3 /*break*/, 4];
|
|
104
105
|
dbgr.interact(operationContext, entity);
|
|
105
106
|
return [4 /*yield*/, dbgr.resume()];
|
|
106
107
|
case 3:
|