From 067bc95e499ef2f1fe26d79739e9936726294a3f Mon Sep 17 00:00:00 2001 From: Dang Hoang Duy Date: Mon, 22 Apr 2024 22:46:14 +0800 Subject: [PATCH] Fix format --- src/cse-machine/interpreter.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/cse-machine/interpreter.ts b/src/cse-machine/interpreter.ts index f6ef54520..57ab05b21 100644 --- a/src/cse-machine/interpreter.ts +++ b/src/cse-machine/interpreter.ts @@ -442,9 +442,11 @@ const cmdEvaluators: { [type: string]: CmdEvaluator } = { // Push ENVIRONMENT instruction if needed - if next control stack item // exists and is not an environment instruction, OR the control only contains // environment indepedent item - if (next - && !(isInstr(next) && next.instrType === InstrType.ENVIRONMENT) - && !canAvoidEnvInstr(control)) { + if ( + next && + !(isInstr(next) && next.instrType === InstrType.ENVIRONMENT) && + !canAvoidEnvInstr(control) + ) { control.push(instr.envInstr(currentEnvironment(context), command)) } @@ -955,10 +957,12 @@ const cmdEvaluators: { [type: string]: CmdEvaluator } = { // Push ENVIRONMENT instruction if needed - if next control stack item // exists and is not an environment instruction, OR the control only contains - // environment indepedent item - if (next - && !(isInstr(next) && next.instrType === InstrType.ENVIRONMENT) - && !canAvoidEnvInstr(control)) { + // environment indepedent item + if ( + next && + !(isInstr(next) && next.instrType === InstrType.ENVIRONMENT) && + !canAvoidEnvInstr(control) + ) { control.push(instr.envInstr(currentEnvironment(context), command.srcNode)) }