1
0
Pārlūkot izejas kodu

Fix DoWhile being matched as While due to inheritance

Lucas de Souza 5 gadi atpakaļ
vecāks
revīzija
25b66fb72e
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      js/processor/ivprogProcessor.js

+ 2 - 2
js/processor/ivprogProcessor.js

@@ -232,10 +232,10 @@ export class IVProgProcessor {
       return this.executeReturn(store, cmd);
     } else if (cmd instanceof Commands.IfThenElse) {
       return this.executeIfThenElse(store, cmd);
-    } else if (cmd instanceof Commands.While) {
-      return this.executeWhile(store, cmd);
     } else if (cmd instanceof Commands.DoWhile) {
       return this.executeDoWhile(store, cmd);
+    } else if (cmd instanceof Commands.While) {
+      return this.executeWhile(store, cmd);
     } else if (cmd instanceof Commands.For) {
       return this.executeFor(store, cmd);
     } else if (cmd instanceof Commands.Switch) {