public override void VisitForEachStatement(ForEachStatementSyntax node)
 {
     if (debug)
     {
         Console.WriteLine(node.ToFullString());
     }
     Todo("ForEachStatement"); var nl = OurLine.NewLine(LineKind.Decl, "ForEachStatement");
     nl.Source     = node.ToFullString();
     nl.ParentKind = node.Parent.RawKind;
     nl.RawKind    = node.RawKind;
     LogCommand(nl);
     StartBlock("ForEachStatement");
     base.VisitForEachStatement(node);
     EndBlock("ForEachStatement");
 }
 private void ThrowIndexRewritingException(QueryExpressionSyntax node, ForEachStatementSyntax stmt)
 {
     throw new InvalidOperationException("Rewriting the function to an optimized version resulted in creating invalid indexing outputs. " +
                                         $"The output needs to have the following fields: [{string.Join(", ", _validator.Fields)}] " +
                                         $"while after the optimization it has: [{string.Join(", ", _validator.ExtractedFields)}].{Environment.NewLine}" +
                                         $"Original indexing func:{Environment.NewLine}{node.ToFullString()}{Environment.NewLine}{Environment.NewLine}" +
                                         $"Optimized indexing func:{Environment.NewLine}{stmt.ToFullString()}");
 }