/// <summary> /// Creates a new StopInstruction. /// </summary> /// <remarks> /// The grammar production is named "End" to avoid a conflict /// with token "STOP". /// </remarks> public override Node ExitEnd(Production node) { ArrayList values = GetChildValues(node); StopInstruction i = new StopInstruction(); i.Address = Assembler.NextInstructionAddress; if (values.Count > 0) { i.Argument1 = (Argument)values[0]; } if (values.Count > 1) { i.Argument2 = (Argument)values[1]; } if (values.Count > 2) { i.Argument3 = (Argument)values[2]; } i.Line = node.StartLine; i.Column = node.StartColumn; i.Assembler = Assembler; Assembler.Instructions.Add(i); return(node); }
/// <summary> /// Creates a new StopInstruction. /// </summary> /// <remarks> /// The grammar production is named "End" to avoid a conflict /// with token "STOP". /// </remarks> public override Node ExitEnd(Production node) { ArrayList values = GetChildValues(node); StopInstruction i = new StopInstruction(); i.Address = Assembler.NextInstructionAddress; if (values.Count > 0) i.Argument1 = (Argument)values[0]; if (values.Count > 1) i.Argument2 = (Argument)values[1]; if (values.Count > 2) i.Argument3 = (Argument)values[2]; i.Line = node.StartLine; i.Column = node.StartColumn; i.Assembler = Assembler; Assembler.Instructions.Add(i); return node; }