private void Execute(string text) { using (Parser parser = new Parser(text)) { ICommand command = parser.ParseCommand(); Assert.IsNull(parser.ParseCommand()); command.Execute(this.environment); } }
private static ICommand ParseCommand(string text) { Parser parser = new Parser(text); ICommand command = parser.ParseCommand(); Assert.IsNull(parser.ParseExpression()); return command; }