Exemplo n.º 1
0
 private void Execute(string text)
 {
     using (Parser parser = new Parser(text))
     {
         ICommand command = parser.ParseCommand();
         Assert.IsNull(parser.ParseCommand());
         command.Execute(this.environment);
     }
 }
Exemplo n.º 2
0
        private static ICommand ParseCommand(string text)
        {
            Parser parser = new Parser(text);

            ICommand command = parser.ParseCommand();

            Assert.IsNull(parser.ParseExpression());

            return command;
        }