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
This commit is contained in:
Tristan B. Velloza Kildaire 2022-12-12 11:18:50 +02:00
parent 74227fe560
commit 18dbe5508f
1 changed files with 3 additions and 2 deletions

View File

@ -156,7 +156,7 @@ public final class LiteralValue : Value
public override string emit()
{
return "<TODO: LiteralValue>";
return to!(string)(data);
}
}
@ -246,7 +246,8 @@ public class BinOpInstr : Value
public override string emit()
{
return "<TODO: BinOpInstr (Op: "~to!(string)(operator)~", Lhs: "~lhs.emit()~", Rhs: "~rhs.emit()~")>";
//TODO: Map SymbolType to maths operator (add support in the check.d module)
return lhs.emit()~to!(string)(operator)~rhs.emit();
}
}