Instruction

- Made the `toString()` method non-final
- Implemented `produceToStrEnclose(string)` which will create the wrapper `[Instruction: <classNameHere>: <addInfo>]` where `<addinfo>` is the string parameter passed in

LiteralValue

- Implemented custom `toString()` - this will fix the whole updating opf types issue
This commit is contained in:
Tristan B. Velloza Kildaire 2023-02-01 16:48:12 +02:00
parent aee83ccfdd
commit b7c8724245
1 changed files with 11 additions and 1 deletions

View File

@ -20,7 +20,12 @@ public class Instruction
// this.instructionName = instructionName;
}
public final override string toString()
public override string toString()
{
return "[Instruction: "~this.classinfo.name~":"~addInfo~"]";
}
private final string produceToStrEnclose(string addInfo)
{
return "[Instruction: "~this.classinfo.name~":"~addInfo~"]";
}
@ -144,6 +149,11 @@ public final class LiteralValue : Value
addInfo = "Data: "~to!(string)(data)~", Type: "~to!(string)(type);
}
public override string toString()
{
return produceToStrEnclose("Data: "~to!(string)(data)~", Type: "~to!(string)(type));
}
}
public final class LiteralValueFloat : Value