From 14fd840cd3c7ad0d704bb939a8b6e56ee02e578f Mon Sep 17 00:00:00 2001
From: Acer <goskovd2017@mail.ru>
Date: Mon, 14 Nov 2022 12:52:18 +0300
Subject: [PATCH] ParserVisitors if while repeat fixed

---
 Module8/Visitors/GenCodeVisitors/GenCodeVisitor.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Module8/Visitors/GenCodeVisitors/GenCodeVisitor.cs b/Module8/Visitors/GenCodeVisitors/GenCodeVisitor.cs
index 9bb671e..a46252a 100644
--- a/Module8/Visitors/GenCodeVisitors/GenCodeVisitor.cs
+++ b/Module8/Visitors/GenCodeVisitors/GenCodeVisitor.cs
@@ -107,7 +107,7 @@ namespace SimpleLang.Visitors
 
             //genc.Emit(OpCodes.Ldloc, x);
             genc.Emit(OpCodes.Ldc_I4_0);
-            genc.Emit(OpCodes.Ble, jmp); // if x<=0 then goto jmp
+            genc.Emit(OpCodes.Beq, jmp); // if x == 0 then goto jmp
 
             i.ifTrue.Visit(this); // выполнить тело true условного оператора
 
-- 
GitLab