Пример #1
0
 public override ExcutableCommand Create(TokenQueue seq, Token first, CompilerApplication context)
 {
     if (base.Match(first, context))
     {
         MacroCommand c = (MacroCommand)Clone();
         c.keyword      = seq.Dequeue();
         c.keyword.Type = TokenType.MACRO_COMMAND;
         c.parameters   = seq.DeQueueLine();
         context.SetMacro(c.keyword.Text, c);
         return(c);
     }
     return((MacroCommand)Clone(seq, context.GetMacro(first.Text)));
 }
        public override ExcutableCommand Create(TokenQueue seq, Token first, CompilerApplication context)
        {
            string key = seq.Dequeue().Text;

            seq.Dequeue();
            Token value = seq.Dequeue();

            context.SetEqu(key, value);
            if (replaced != null)
            {
                return(null);
            }
            EquTokenQueue queue = new EquTokenQueue(seq.Count, context);

            foreach (var c in seq)
            {
                queue.Enqueue(c);
            }
            seq.Clear();
            context.context.Tokens = queue;
            replaced = queue;
            return(null);
        }