Instruction
- Added `emit()` method to base Instruction class - Fixed typo in name of `StorageDeclaration` class - WIP: `VariableDeclaration` emit()
This commit is contained in:
parent
5a22b184b7
commit
1e2ef795d6
|
@ -20,6 +20,11 @@ public class Instruction
|
|||
{
|
||||
return "[Instruction: "~this.classinfo.name~":"~addInfo~"]";
|
||||
}
|
||||
|
||||
public string emit()
|
||||
{
|
||||
return "TODO: This instruction has not provided an emit text yet! (This is an error!)";
|
||||
}
|
||||
}
|
||||
|
||||
public class FetchInst : Instruction
|
||||
|
@ -32,7 +37,7 @@ public class Value : Instruction
|
|||
|
||||
}
|
||||
|
||||
public class StorageDeclaratio : Instruction
|
||||
public class StorageDeclaration : Instruction
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -61,7 +66,7 @@ public class VariableAssignmentInstr : Instruction
|
|||
}
|
||||
}
|
||||
|
||||
public final class VariableDeclaration : StorageDeclaratio
|
||||
public final class VariableDeclaration : StorageDeclaration
|
||||
{
|
||||
/* Name of variable being declared */
|
||||
public string varName;
|
||||
|
@ -76,6 +81,12 @@ public final class VariableDeclaration : StorageDeclaratio
|
|||
|
||||
addInfo = "varName: "~varName;
|
||||
}
|
||||
|
||||
public override string emit()
|
||||
{
|
||||
// TODO: This should change
|
||||
return "my var";
|
||||
}
|
||||
}
|
||||
|
||||
public final class FetchValueVar : Value
|
||||
|
|
Loading…
Reference in New Issue