예제 #1
0
 public override bool Match(Token first, CompilerApplication context)
 {
     if (base.Match(first, context) || context.GetMacro(first.Text) != null)
     {
         return(true);
     }
     return(false);
 }
예제 #2
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)));
 }