diff --git a/source/tlang/compiler/codegen/instruction.d b/source/tlang/compiler/codegen/instruction.d index f205313b..cf0165dc 100644 --- a/source/tlang/compiler/codegen/instruction.d +++ b/source/tlang/compiler/codegen/instruction.d @@ -4,6 +4,7 @@ import std.conv : to; import compiler.typecheck.dependency.core : Context; import std.string : cmp; import misc.utils : symbolRename; +import compiler.symbols.data : SymbolType; public class Instruction { @@ -65,6 +66,11 @@ public class VariableAssignmentInstr : Instruction addInfo = "assignTo: "~varName~", valInstr: "~data.toString(); } + + public override string emit() + { + return ""; + } } public final class LiteralValueFloat : Value @@ -220,7 +231,6 @@ public final class StringLiteral : Value */ public class BinOpInstr : Value { - import compiler.symbols.data; private Instruction lhs; private Instruction rhs; private SymbolType operator; @@ -229,9 +239,15 @@ public class BinOpInstr : Value { this.lhs = lhs; this.rhs = rhs; + this.operator = operator; addInfo = "BinOpType: "~to!(string)(operator)~", LhsValInstr: "~lhs.toString()~", RhsValInstr: "~rhs.toString(); } + + public override string emit() + { + return ""; + } } /** @@ -241,13 +257,13 @@ public class BinOpInstr : Value */ public class UnaryOpInstr : Value { - import compiler.symbols.data; private Instruction exp; private SymbolType operator; this(Instruction exp, SymbolType operator) { this.exp = exp; + this.operator = operator; addInfo = "UnaryOpType: "~to!(string)(operator)~", Instr: "~exp.toString(); }