From 18dbe5508f4b2c658472b7e1e3c6d81769d51432 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 12 Dec 2022 11:18:50 +0200 Subject: [PATCH] LiteralValue - Implemented the correct emit for this instruction (just emits the string version of the ulong `data` BinOpInstr - Emit is almost correct, just missing a mapping from SymbolType to the maths operator required --- source/tlang/compiler/codegen/instruction.d | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/tlang/compiler/codegen/instruction.d b/source/tlang/compiler/codegen/instruction.d index cf0165d..aeb50f2 100644 --- a/source/tlang/compiler/codegen/instruction.d +++ b/source/tlang/compiler/codegen/instruction.d @@ -156,7 +156,7 @@ public final class LiteralValue : Value public override string emit() { - return ""; + return to!(string)(data); } } @@ -246,7 +246,8 @@ public class BinOpInstr : Value public override string emit() { - return ""; + //TODO: Map SymbolType to maths operator (add support in the check.d module) + return lhs.emit()~to!(string)(operator)~rhs.emit(); } }