129 references to IsNode
AnalyzerRunner (1)
Program.cs (1)
212var numberOfNodes = tokensAndNodes.Count(x => x.IsNode);
Microsoft.CodeAnalysis (22)
Syntax\SeparatedSyntaxList.cs (3)
73Debug.Assert(item.IsNode, "Node missing in separated list."); 429if (nodesToInsertWithSeparators.Count > 0 || (insertionIndex > 0 && nodesWithSeps[insertionIndex - 1].IsNode)) 439if (insertionIndex < nodesWithSeps.Count && nodesWithSeps[insertionIndex] is { IsNode: true } nodeOrToken)
Syntax\SyntaxNavigator.cs (10)
121if (child.IsNode) 123Debug.Assert(child.IsNode); 168if (child.IsNode) 170Debug.Assert(child.IsNode); 454Debug.Assert(child.IsNode); 462else if (child.IsNode && child.AsNode() == node) 504Debug.Assert(child.IsNode); 512else if (child.IsNode && child.AsNode() == node) 562Debug.Assert(child.IsNode); 616Debug.Assert(child.IsNode);
Syntax\SyntaxNode.cs (2)
1283return this.GetAnnotatedNodesAndTokens(syntaxAnnotation).Where(n => n.IsNode).Select(n => n.AsNode()!); 1293return this.GetAnnotatedNodesAndTokens(annotationKind).Where(n => n.IsNode).Select(n => n.AsNode()!);
Syntax\SyntaxNode.Iterators.cs (2)
20? DescendantNodesAndTokensImpl(span, descendIntoChildren, true, includeSelf).Where(e => e.IsNode).Select(e => e.AsNode()!) 464if (value.IsNode)
Syntax\SyntaxNodeOrToken.cs (4)
144public bool IsToken => !IsNode; 199if (IsNode) 749if (this.IsNode != other.IsNode)
Syntax\SyntaxWalker.cs (1)
38if (child.IsNode)
Microsoft.CodeAnalysis.CodeStyle (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (2)
118if (c1.IsNode && c2.IsNode)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeOrTokenExtensions.cs (2)
16if (nodeOrToken.IsNode) 36if (current.IsNode)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
175=> node.GetAnnotatedNodesAndTokens(annotationKind).Where(nt => nt.IsNode).Select(nt => nt.AsNode()!); 187=> node.GetAnnotatedNodesAndTokens(annotationKind).Where(nt => nt.IsNode && this.HasAnnotations<TSpecificAnnotation>(nt)).Select(nt => nt.AsNode()!);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SyntaxPath.cs (1)
146nodeOrToken.IsNode &&
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
376if (sibling.IsNode)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (1)
214var isNode = nodeOrToken.IsNode;
Microsoft.CodeAnalysis.CSharp (6)
Compilation\MemberSemanticModel.cs (1)
791if (label.IdentifierNodeOrToken.IsNode &&
Parser\Blender.Cursor.cs (1)
132Debug.Assert(this.CurrentNodeOrToken.IsNode);
Parser\Blender.Reader.cs (2)
92if (_oldTreeCursor.CurrentNodeOrToken.IsNode) 264(nodeOrToken.IsNode && IsIncomplete((CSharp.CSharpSyntaxNode)nodeOrToken.AsNode())))
Symbols\Source\SourceLabelSymbol.cs (1)
31Debug.Assert(identifierNodeOrToken.IsToken || identifierNodeOrToken.IsNode);
Syntax\SyntaxFactory.cs (1)
1484if (element.IsNode && !(element.AsNode() is TNode))
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersDiagnosticAnalyzer.cs (1)
37if (child.IsNode && context.ShouldAnalyzeSpan(child.Span))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\PopulateSwitch\CSharpPopulateSwitchExpressionCodeFixProvider.cs (1)
44!switchNode.Arms.GetWithSeparators().LastOrDefault().IsNode)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
673if (item.IsNode)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1819if (child.IsNode)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (1)
176if (n.IsNode)
Microsoft.CodeAnalysis.CSharp.Features (12)
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersDiagnosticAnalyzer.cs (1)
37if (child.IsNode && context.ShouldAnalyzeSpan(child.Span))
src\Analyzers\CSharp\CodeFixes\PopulateSwitch\CSharpPopulateSwitchExpressionCodeFixProvider.cs (1)
44!switchNode.Arms.GetWithSeparators().LastOrDefault().IsNode)
Structure\Providers\AccessorDeclarationStructureProvider.cs (1)
38&& (!nextSibling.IsNode || nextSibling.AsNode() is AccessorDeclarationSyntax);
Structure\Providers\ConstructorDeclarationStructureProvider.cs (1)
38&& (!nextSibling.IsNode || nextSibling.IsKind(SyntaxKind.ConstructorDeclaration));
Structure\Providers\ConversionOperatorDeclarationStructureProvider.cs (1)
40&& (!nextSibling.IsNode || nextSibling.IsKind(SyntaxKind.ConversionOperatorDeclaration));
Structure\Providers\EnumDeclarationStructureProvider.cs (1)
33&& (!nextSibling.IsNode || nextSibling.AsNode() is BaseTypeDeclarationSyntax);
Structure\Providers\EventDeclarationStructureProvider.cs (1)
39&& (!nextSibling.IsNode || nextSibling.Kind() is SyntaxKind.EventDeclaration or SyntaxKind.EventFieldDeclaration);
Structure\Providers\IndexerDeclarationStructureProvider.cs (1)
39&& (!nextSibling.IsNode || nextSibling.Kind() is SyntaxKind.IndexerDeclaration or SyntaxKind.PropertyDeclaration);
Structure\Providers\MethodDeclarationStructureProvider.cs (1)
38&& (!nextSibling.IsNode || nextSibling.IsKind(SyntaxKind.MethodDeclaration));
Structure\Providers\OperatorDeclarationStructureProvider.cs (1)
38&& (!nextSibling.IsNode || nextSibling.IsKind(SyntaxKind.OperatorDeclaration));
Structure\Providers\PropertyDeclarationStructureProvider.cs (1)
38&& (!nextSibling.IsNode || nextSibling.Kind() is SyntaxKind.PropertyDeclaration or SyntaxKind.IndexerDeclaration);
Structure\Providers\TypeDeclarationStructureProvider.cs (1)
41&& (!nextSibling.IsNode || nextSibling.AsNode() is BaseTypeDeclarationSyntax);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\InteractiveSemanticModelTests.cs (1)
290if (child.IsNode)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\SemanticModelAPITests.cs (1)
4791if (child.IsNode)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (10)
Parsing\ParsingTests.cs (1)
282if (current.IsNode)
Syntax\SyntaxAnnotationTests.cs (6)
161var node = GetAllNodesAndTokens(tree.GetCompilationUnitRoot()).First(t => t.IsNode).AsNode(); 284var firstNode = GetAllNodesAndTokens(tree.GetCompilationUnitRoot()).First(t => t.IsNode).AsNode(); 287var lastChildOfFirstNode = children.Last(t => t.IsNode).AsNode(); 295var firstNodeInNewTree = GetAllNodesAndTokens(newRoot).First(t => t.IsNode).AsNode(); 299var rightNode = firstNodeInNewTree.ChildNodesAndTokens().Last(t => t.IsNode).AsNode(); 438if (sourceTreeNodeOrTokenEnumerator.Current.IsNode)
Syntax\SyntaxListTests.cs (1)
303Assert.True(item.IsNode);
Syntax\SyntaxNodeTests.cs (2)
1810Assert.True(nodeOrToken.IsNode); 3522var node = (SyntaxNode)children.First(n => n.IsNode);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CSharpTestBase.cs (1)
1574if (child.IsNode)
SemanticModelTestBase.cs (1)
50if (child.IsNode)
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Classification\Worker.cs (1)
71Debug.Assert(nodeOrToken.IsNode || nodeOrToken.IsToken);
Simplification\Reducers\AbstractCSharpReducer.AbstractReductionRewriter.cs (1)
195if (nodeOrToken.IsNode)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
673if (item.IsNode)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1819if (child.IsNode)
Microsoft.CodeAnalysis.Features (5)
SplitOrMergeIfStatements\AbstractSplitIfStatementCodeRefactoringProvider.cs (1)
91return current.IsNode;
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
376if (sibling.IsNode)
Wrapping\BinaryExpression\AbstractBinaryExpressionWrapper.cs (1)
79Debug.Assert(((i % 2) == 0 && item.IsNode) ||
Wrapping\ChainedExpression\ChainedExpressionCodeActionComputer.cs (1)
175=> chunk.Sum(s => s.IsNode ? s.AsNode().Width() : s.AsToken().Width());
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (1)
220if (last.IsNode)
Microsoft.CodeAnalysis.Test.Utilities (3)
Syntax\NodeHelpers.cs (2)
81if (node.IsNode) 135if (nodeOrToken.IsNode)
Syntax\XmlHelpers.cs (1)
101if (node.IsNode)
Microsoft.CodeAnalysis.UnitTests (2)
CommonSyntaxTests.cs (2)
49Assert.False(d.IsNode); 66Assert.False(d.IsNode);
Microsoft.CodeAnalysis.VisualBasic (3)
Syntax\SyntaxNodeFactories.vb (1)
990If element.IsNode AndAlso Not (TypeOf element.AsNode() Is TNode) Then
Syntax\VisualBasicSyntaxNode.vb (2)
338If child.IsNode Then 364If child.IsNode Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
src\Analyzers\VisualBasic\Analyzers\OrderModifiers\VisualBasicOrderModifiersDiagnosticAnalyzer.vb (1)
34If child.IsNode And context.ShouldAnalyzeSpan(child.Span) Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb (1)
129If child.IsNode Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTokenExtensions.vb (1)
138If n.IsNode AndAlso DirectCast(n.AsNode(), ArgumentSyntax).IsNamed Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (1)
991If child.IsNode Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (1)
src\Features\VisualBasicTest\Utils.vb (1)
59If child.IsNode Then
Microsoft.CodeAnalysis.VisualBasic.Features (2)
Completion\KeywordRecommenders\PreprocessorDirectives\PreprocessorHelpers.vb (1)
49If child.IsNode Then
src\Analyzers\VisualBasic\Analyzers\OrderModifiers\VisualBasicOrderModifiersDiagnosticAnalyzer.vb (1)
34If child.IsNode And context.ShouldAnalyzeSpan(child.Span) Then
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (1)
Utils.vb (1)
59If child.IsNode Then
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (11)
Syntax\SyntaxAnnotationTests.vb (6)
147Dim node = GetAllNodesAndTokens(tree.GetRoot()).First(Function(t) t.IsNode).AsNode() 266Dim firstNode = GetAllNodesAndTokens(tree.GetRoot()).First(Function(t) t.IsNode).AsNode() 269Dim lastChildOfFirstNode = Enumerable.Last(children, Function(t) t.IsNode).AsNode() 277Dim firstNodeInNewTree = GetAllNodesAndTokens(newRoot).First(Function(t) t.IsNode).AsNode() 281Dim rightNode = Enumerable.Last(firstNodeInNewTree.ChildNodesAndTokens(), Function(t) t.IsNode).AsNode() 405If sourceTreeNodeOrTokenEnumerator.Current.IsNode Then
Syntax\SyntaxListTests.vb (1)
232Assert.True(item.IsNode)
TestSyntaxNodes.vb (4)
254If node.IsNode Then 279If list(i).IsNode Then 2179Assert.Equal(sN.IsNode, cS.IsNode)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (5)
ParserTestUtilities.vb (5)
410If node.IsNode Then 777If node.IsNode Then 799If node.IsNode Then 822If node.IsNode Then 851If node.IsNode Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (6)
Classification\Worker.vb (1)
63If nodeOrToken.IsNode Then
CodeCleanup\VisualBasicCodeCleanerService.vb (1)
52If child.IsNode Then
Simplification\Reducers\AbstractVisualBasicReducer.AbstractReductionRewriter.vb (1)
180If nodeOrToken.IsNode Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb (1)
129If child.IsNode Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTokenExtensions.vb (1)
138If n.IsNode AndAlso DirectCast(n.AsNode(), ArgumentSyntax).IsNamed Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (1)
991If child.IsNode Then
Microsoft.CodeAnalysis.Workspaces (10)
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (1)
85if (current.IsNode)
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
660if (tokenOrNode.IsNode)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (2)
118if (c1.IsNode && c2.IsNode)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeOrTokenExtensions.cs (2)
16if (nodeOrToken.IsNode) 36if (current.IsNode)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
175=> node.GetAnnotatedNodesAndTokens(annotationKind).Where(nt => nt.IsNode).Select(nt => nt.AsNode()!); 187=> node.GetAnnotatedNodesAndTokens(annotationKind).Where(nt => nt.IsNode && this.HasAnnotations<TSpecificAnnotation>(nt)).Select(nt => nt.AsNode()!);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SyntaxPath.cs (1)
146nodeOrToken.IsNode &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (1)
214var isNode = nodeOrToken.IsNode;
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SymbolKeyTests.cs (1)
1522if (child.IsNode)
System.Text.Json.SourceGeneration (2)
src\libraries\Common\src\Roslyn\SyntaxValueProvider_ForAttributeWithSimpleName.cs (2)
257if (child.IsNode) 348if (child.IsNode)