public class PushZero : Instruction{ public PushZero(VirtualMachine globalScope, Procedure scope, Traceback traceback) : base(globalScope, scope, traceback) { } public override void Callback() { scope.instructionPointer++; globalScope.stack.Push(0); }}public class Add : Instruction{ public Add(VirtualMachine globalScope, Procedure scope, Traceback traceback) : base(globalScope, scope, traceback) { } public override void Callback() { scope.instructionPointer++; if (!globalScope.stack.TryPeek(out _)) { throw new CCLRuntimeError("Instruction '+' cannot add to an empty stack.", traceback); } }}
base