1
0
Selaa lähdekoodia

Fix DoWhile being matched as While due to inheritance

Lucas de Souza 5 vuotta sitten
vanhempi
commit
25b66fb72e
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  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) {