コード例 #1
0
ファイル: BlockStatements.cs プロジェクト: kobi2187/CsDisplay
 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");
 }
コード例 #2
0
 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()}");
 }