Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
DiligentPenguinn committed Apr 22, 2024
1 parent 4d26880 commit 067bc95
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/cse-machine/interpreter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down Expand Up @@ -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))
}

Expand Down

0 comments on commit 067bc95

Please sign in to comment.