public override object VisitArgument(GraphQLParser.ArgumentContext context)
        {
            var name     = context.NAME().GetText();
            var valOrVar = context.valueOrVariable();
            var val      = valOrVar.value() != null?valOrVar.value().GetText() : valOrVar.variable().GetText();

            var arg = new Argument
            {
                Name  = name,
                Value = val
            };

            Console.WriteLine("argument: {0}:{1}", arg.Name, arg.Value);

            return(base.VisitArgument(context));
        }
Example #2
0
 /// <summary>
 /// Exit a parse tree produced by <see cref="GraphQLParser.argument"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitArgument([NotNull] GraphQLParser.ArgumentContext context)
 {
 }