public void Advance(int inCurrent, ref List <CompilerInstruction> ioInstructions) { CompilerInstruction instruction = ioInstructions[PrevPointer]; instruction.IntArg = inCurrent; ioInstructions[PrevPointer] = instruction; PrevPointer = -1; }
public Macro(CompilerInstruction inInstruction) { Operations = new OpCode[] { inInstruction.Operation }; if (inInstruction.IntArg.HasValue) { Args = new int[] { inInstruction.IntArg.Value } } ; }
public void End(int inEnd, ref List <CompilerInstruction> ioInstructions) { if (PrevPointer != -1) { Advance(inEnd, ref ioInstructions); PrevPointer = -1; } for (int i = 0; i < PointersToEnd.Count; ++i) { CompilerInstruction instruction = ioInstructions[PointersToEnd[i]]; instruction.IntArg = inEnd; ioInstructions[PointersToEnd[i]] = instruction; } }