Example #1
0
 public override void VisitForStatement(ForStatementSyntax node)
 {
     if (entryNode is AnonymousFunctionExpressionSyntax && embeddedNode is AnonymousFunctionExpressionSyntax)
     {
         return;
     }
     if (_weComeFromMethod && _weInAnonymousMethod)
     {
         return;
     }
     InsertLLOCMap(node.GetLocation());
     if (node.Declaration != null)
     {
         foreach (var variable in node.Declaration.Variables)
         {
             InsertLLOCMap(variable.GetLocation());
         }
     }
     InsertLLOCMap(node.FirstSemicolonToken.GetLocation());
     if (node.Condition != null)
     {
         InsertLLOCMap(node.Condition.GetLocation());
     }
     InsertLLOCMap(node.SecondSemicolonToken.GetLocation());
     foreach (var incrementor in node.Incrementors)
     {
         InsertLLOCMap(incrementor.GetLocation());
     }
     base.VisitForStatement(node);
 }