diff --git a/Triangle.Compiler/src/main/java/triangle/codeGenerator/Encoder.java b/Triangle.Compiler/src/main/java/triangle/codeGenerator/Encoder.java
index c80d908..6ff9b84 100644
--- a/Triangle.Compiler/src/main/java/triangle/codeGenerator/Encoder.java
+++ b/Triangle.Compiler/src/main/java/triangle/codeGenerator/Encoder.java
@@ -185,6 +185,10 @@ public final class Encoder implements ActualParameterVisitor,
@Override
public Void visitRepeatCommand(RepeatCommand ast, Frame frame) {
+ var loopAddr = emitter.getNextInstrAddr();
+ ast.E.visit(this, frame);
+ ast.C.visit(this, frame);
+ emitter.emit(OpCode.JUMPIF, Machine.trueRep, Register.CB, loopAddr);
return null;
}
diff --git a/Triangle.Compiler/src/main/java/triangle/contextualAnalyzer/Checker.java b/Triangle.Compiler/src/main/java/triangle/contextualAnalyzer/Checker.java
index 18e3c63..0ba7ff0 100644
--- a/Triangle.Compiler/src/main/java/triangle/contextualAnalyzer/Checker.java
+++ b/Triangle.Compiler/src/main/java/triangle/contextualAnalyzer/Checker.java
@@ -188,6 +188,10 @@ public final class Checker implements ActualParameterVisitor