public override void Parse(Context context) { while (true) { if (context.CurrentToken() == null) { throw new ParseException("Missing 'end'"); } if (context.CurrentToken().Equals("end")) { context.SkipToken("end"); break; } CommandNode commnadNode = new CommandNode(); commnadNode.Parse(context); list.Add(commnadNode); } }