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:
parent
aee83ccfdd
commit
b7c8724245
|
@ -20,7 +20,12 @@ public class Instruction
|
||||||
// this.instructionName = instructionName;
|
// 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~"]";
|
return "[Instruction: "~this.classinfo.name~":"~addInfo~"]";
|
||||||
}
|
}
|
||||||
|
@ -144,6 +149,11 @@ public final class LiteralValue : Value
|
||||||
|
|
||||||
addInfo = "Data: "~to!(string)(data)~", Type: "~to!(string)(type);
|
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
|
public final class LiteralValueFloat : Value
|
||||||
|
|
Loading…
Reference in New Issue