added comments

This commit is contained in:
Lauchmelder 2021-11-28 15:46:47 +01:00
parent b43f547ae5
commit ee6fc7b02d
2 changed files with 27 additions and 8 deletions

View file

@ -10,19 +10,20 @@ enum InstructionType
abstract class Instruction
{
public fn: InstructionType;
private type: InstructionType;
public params :Parameter[];
private argc: number;
constructor(type: InstructionType, argc: number)
{
this.fn = type;
this.type = type;
this.argc = argc;
this.params = [];
}
abstract eval();
public getParameterCount(): number { return this.argc; }
public getType(): InstructionType { return this.type; }
}
class PointInstruction extends Instruction