void ParseOneParameterInstruction(String[] split) { switch (type) { case InstructionType.snd: case InstructionType.rcv: firstParemeter = new InstructionParameter(split[1]); break; default: throw new NotSupportedException(); } }
void ParseTwoParametersInstruction(String[] split) { switch (type) { case InstructionType.set: case InstructionType.add: case InstructionType.mul: case InstructionType.mod: case InstructionType.jgz: firstParemeter = new InstructionParameter(split[1]); secondParemeter = new InstructionParameter(split[2]); break; default: throw new NotSupportedException(); } }