Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function interpretSequence(seq, rec, rej, res){
//This is the primary queue of actions. All actions in here will be "cold",
//meaning they haven't had the chance yet to run concurrent computations.
var queue = new Denque();
//These combined variables define our current state.
// future = the future we are currently forking
// action = the action to be informed when the future settles
// cancel = the cancel function of the current future
// settled = a boolean indicating whether a new tick should start
// async = a boolean indicating whether we are awaiting a result asynchronously
var future, action, cancel = noop, stack = nil, settled, async = true, it;
//Pushes a new action onto the stack. The stack is used to keep "hot"
//actions. The last one added is the first one to process, because actions
//are pushed right-to-left (see warmupActions).
function pushStack(x){
stack = cons(x, stack);
}
Transformation.prototype._interpret = function Transformation$interpret(rec, rej, res){
//This is the primary queue of actions. All actions in here will be "cold",
//meaning they haven't had the chance yet to run concurrent computations.
var queue = new Denque();
//These combined variables define our current state.
// future = the future we are currently forking
// action = the action to be informed when the future settles
// cancel = the cancel function of the current future
// settled = a boolean indicating whether a new tick should start
// async = a boolean indicating whether we are awaiting a result asynchronously
var future, action, cancel = noop, stack = nil, settled, async = true, it;
//Pushes a new action onto the stack. The stack is used to keep "hot"
//actions. The last one added is the first one to process, because actions
//are pushed right-to-left (see warmupActions).
function pushStack(x){
stack = cons(x, stack);
}
constructor(
script: IScript,
symbolTableBuilder: SymbolTableBuilder,
logger: ILogger = mockLogger,
tracer: ITracer = mockTracer,
) {
this.script = script;
this.tableBuilder = symbolTableBuilder;
this.localResolver = new LocalResolver();
this.setResolver = new SetResolver(this.localResolver);
this.deferred = new Denque();
this.lazyGlobal = true;
this.firstStmt = true;
this.deferResolve = true;
this.loopDepth = 0;
this.functionDepth = 0;
this.triggerDepth = 0;
this.logger = logger;
this.tracer = tracer;
}