Browse Source

Fix: compiler

AnnulusGames 1 year ago
parent
commit
2ffdec3b79
1 changed files with 1 additions and 8 deletions
  1. 1 8
      src/Lua/CodeAnalysis/Compilation/LuaCompiler.cs

+ 1 - 8
src/Lua/CodeAnalysis/Compilation/LuaCompiler.cs

@@ -149,14 +149,7 @@ public sealed class LuaCompiler : ISyntaxNodeVisitor<ScopeCompilationContext, bo
             context.PushInstruction(Instruction.Jmp(0, 0), node.Position);
             context.PushInstruction(Instruction.Jmp(0, 0), node.Position);
 
 
             context.StackPosition = r;
             context.StackPosition = r;
-            if (node.RightNode is IdentifierNode rightIdentifier)
-            {
-                LoadIdentifier(rightIdentifier.Name, context, rightIdentifier.Position, true);
-            }
-            else
-            {
-                node.RightNode.Accept(this, context);
-            }
+            node.RightNode.Accept(this, context);
 
 
             context.Function.Instructions[testJmpIndex].SBx = context.Function.Instructions.Length - testJmpIndex - 1;
             context.Function.Instructions[testJmpIndex].SBx = context.Function.Instructions.Length - testJmpIndex - 1;
         }
         }