public override object VisitObjectValue(GraphQLParser.ObjectValueContext context) { var fields = new List <ObjectField>(); foreach (var item in context.objectField()) { var name = item.NAME().GetText(); var val = Visit(item.value()) as IValue; var field = new ObjectField(name, val); fields.Add(field); } var objValue = new ObjectValue(fields); NewNode(objValue, context); return(objValue); }
/// <summary> /// Exit a parse tree produced by the <c>objectValue</c> /// labeled alternative in <see cref="GraphQLParser.value"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitObjectValue([NotNull] GraphQLParser.ObjectValueContext context) { }