Explorar o código

Fix DoWhile being matched as While due to inheritance

Lucas de Souza %!s(int64=5) %!d(string=hai) anos
pai
achega
25b66fb72e
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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) {