Browse Source

Added Unary Oprator Instruction

constants
Tristan B. V. Kildaire 10 months ago
parent
commit
1e202fe788
  1. 19
      source/tlang/compiler/codegen/instruction.d

19
source/tlang/compiler/codegen/instruction.d

@ -130,6 +130,25 @@ public class BinOpInstr : Value
}
}
/**
* UnaryOpInstr instruction
*
* Any sort of Unary Operator
*/
public class UnaryOpInstr : Value
{
import compiler.symbols.data;
private Instruction exp;
private SymbolType operator;
this(Instruction exp, SymbolType operator)
{
this.exp = exp;
addInfo = "UnaryOpType: "~to!(string)(operator)~", Instr: "~exp.toString();
}
}
/**
* 2022 New things
*

Loading…
Cancel
Save