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