Instruction

- Added TODO regarding access modifier of the `context` field
- Added `setContext(Context)` for setting the context of the Instruction object
This commit is contained in:
Tristan B. Velloza Kildaire 2023-02-01 17:26:39 +02:00
parent 085adc3536
commit 9b07884012
1 changed files with 6 additions and 1 deletions

View File

@ -11,7 +11,7 @@ import compiler.symbols.typing.core : Type;
public class Instruction
{
/* Context for the Instruction (used in emitter for name resolution) */
public Context context;
public Context context; //TODO: Make this private and add a setCOntext
protected string addInfo;
@ -34,6 +34,11 @@ public class Instruction
{
return context;
}
public final void setContext(Context context)
{
this.context = context;
}
}
public class FetchInst : Instruction