Пример #1
0
 private IEnumerable <GraphqlParseException> FindExceptions(ParserRuleContext context)
 {
     if (context.exception != null)
     {
         yield return(new GraphqlParseException($"Unable to parse, could not match {context.GetType().Name} at {context.Start.Line}:{context.Start.Column}", context.Location(), context.exception));
     }
     if (context.children != null)
     {
         foreach (var child in context.children.OfType <ParserRuleContext>())
         {
             foreach (var ex in FindExceptions(child))
             {
                 yield return(ex);
             }
         }
     }
 }