public MacroOrStructInvocation(IZ80AsmVisitorContext visitorContext, Z80AsmParser.MacroOrStructInvocationContext context) { Parameters = new List <Operand>(); if (context.macroArgument().Length > 1 || context.macroArgument().Length > 0 && context.macroArgument()[0].operand() != null) { Parameters.AddRange(context.macroArgument() .Select(arg => arg.operand() != null ? visitorContext.GetOperand(arg.operand()) : new Operand())); } KeywordSpan = new TextSpan(context.Start.StartIndex, context.Start.StopIndex + 1); Name = context.IDENTIFIER().GetText(); }
public override object VisitMacroOrStructInvocation(Z80AsmParser.MacroOrStructInvocationContext context) => new MacroOrStructInvocation(this, context);