From b51f38951aa05bc221da8f900ad309c6e0933e17 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 12 Dec 2022 15:13:45 +0200 Subject: [PATCH] VariableAssignmentInstr - Now emits correct assignment C code --- source/tlang/compiler/codegen/instruction.d | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/tlang/compiler/codegen/instruction.d b/source/tlang/compiler/codegen/instruction.d index c927ff0..60b540f 100644 --- a/source/tlang/compiler/codegen/instruction.d +++ b/source/tlang/compiler/codegen/instruction.d @@ -76,7 +76,11 @@ public class VariableAssignmentInstr : Instruction string typedEntityVariableName = context.tc.getResolver().generateName(context.getContainer(), typedEntityVariable); - return typedEntityVariableName~" = "~data.emit()~";"; + import compiler.codegen.mapper : SymbolMapper; + string renamedSymbol = SymbolMapper.symbolLookup(context.getContainer(), typedEntityVariableName); + + + return renamedSymbol~" = "~data.emit()~";"; // return "