194 references to IsNode
AnalyzerRunner (1)
Program.cs (1)
212var numberOfNodes = tokensAndNodes.Count(x => x.IsNode);
Microsoft.CodeAnalysis (24)
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithSimpleName.cs (2)
209if (child.IsNode) 279if (child.IsNode)
Syntax\SeparatedSyntaxList.cs (3)
44Debug.Assert(item.IsNode, "Node missing in separated list."); 400if (nodesToInsertWithSeparators.Count > 0 || (insertionIndex > 0 && nodesWithSeps[insertionIndex - 1].IsNode)) 410if (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)
1280return this.GetAnnotatedNodesAndTokens(syntaxAnnotation).Where(n => n.IsNode).Select(n => n.AsNode()!); 1290return 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)
37if (child.IsNode)
Microsoft.CodeAnalysis.CodeStyle (11)
AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
61if (child.IsNode)
AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
61if (child.IsNode)
AnnotationTable.cs (2)
180=> node.GetAnnotatedNodesAndTokens(_annotationKind).Where(nt => nt.IsNode).Select(nt => nt.AsNode()!); 192=> node.GetAnnotatedNodesAndTokens(_annotationKind).Where(nt => nt.IsNode && this.HasAnnotations<TSpecificAnnotation>(nt)).Select(nt => nt.AsNode()!);
FormattingExtensions.cs (2)
299var firstToken = nodeOrToken.IsNode ? nodeOrToken.AsNode()!.GetFirstToken(includeZeroWidth: true) : nodeOrToken.AsToken(); 300var lastToken = nodeOrToken.IsNode ? nodeOrToken.AsNode()!.GetLastToken(includeZeroWidth: true) : nodeOrToken.AsToken();
SemanticModelExtensions.cs (1)
140if (child.IsNode)
SymbolKey.AliasSymbolKey.cs (1)
83if (child.IsNode)
SyntaxNodeOrTokenExtensions.cs (1)
24if (current.IsNode)
SyntaxPath.cs (1)
146nodeOrToken.IsNode &&
UseNamedMemberInitializerAnalyzer.cs (1)
208if (child.IsNode)
Microsoft.CodeAnalysis.CSharp (6)
Compilation\MemberSemanticModel.cs (1)
781if (label.IdentifierNodeOrToken.IsNode &&
Parser\Blender.Cursor.cs (1)
112Debug.Assert(this.CurrentNodeOrToken.IsNode);
Parser\Blender.Reader.cs (2)
95if (_oldTreeCursor.CurrentNodeOrToken.IsNode) 267(nodeOrToken.IsNode && IsIncomplete((CSharp.CSharpSyntaxNode)nodeOrToken.AsNode())))
Symbols\Source\SourceLabelSymbol.cs (1)
31Debug.Assert(identifierNodeOrToken.IsToken || identifierNodeOrToken.IsNode);
Syntax\SyntaxFactory.cs (1)
1483if (element.IsNode && !(element.AsNode() is TNode))
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
51if (child.IsNode)
ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
52if (child.IsNode)
ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
66if (child.IsNode)
ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
57if (child.IsNode)
CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
227if (child.IsNode)
CSharpOrderModifiersDiagnosticAnalyzer.cs (1)
37if (child.IsNode)
EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
62if (child.IsNode)
ParenthesizedExpressionSyntaxExtensions.cs (1)
356if (nodeOrToken.IsNode && !nodeOrToken.IsKind(SyntaxKind.ParenthesizedExpression))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
CSharpPopulateSwitchExpressionCodeFixProvider.cs (1)
48!switchNode.Arms.GetWithSeparators().LastOrDefault().IsNode)
CSharpTypeInferenceService.TypeInferrer.cs (1)
1872if (child.IsNode)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
669if (item.IsNode)
SeparatedSyntaxListExtensions.cs (1)
20if (!nodesAndTokens.Last().IsNode)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (1)
175if (n.IsNode)
Microsoft.CodeAnalysis.CSharp.Features (21)
ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
51if (child.IsNode)
ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
52if (child.IsNode)
ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
66if (child.IsNode)
ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
57if (child.IsNode)
CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
227if (child.IsNode)
CSharpOrderModifiersDiagnosticAnalyzer.cs (1)
37if (child.IsNode)
CSharpPopulateSwitchExpressionCodeFixProvider.cs (1)
48!switchNode.Arms.GetWithSeparators().LastOrDefault().IsNode)
EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
62if (child.IsNode)
Highlighting\KeywordHighlighters\AsyncAwaitHighlighter.cs (1)
61if (child.IsNode)
StringIndentation\CSharpStringIndentationService.cs (1)
70if (child.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.IsKind(SyntaxKind.EventDeclaration) || nextSibling.IsKind(SyntaxKind.EventFieldDeclaration));
Structure\Providers\IndexerDeclarationStructureProvider.cs (1)
39&& (!nextSibling.IsNode || nextSibling.IsKind(SyntaxKind.IndexerDeclaration) || nextSibling.IsKind(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.IsKind(SyntaxKind.PropertyDeclaration) || nextSibling.IsKind(SyntaxKind.IndexerDeclaration));
Structure\Providers\TypeDeclarationStructureProvider.cs (1)
42&& (!nextSibling.IsNode || nextSibling.AsNode() is BaseTypeDeclarationSyntax);
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
264if (child.IsNode)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\InteractiveSemanticModelTests.cs (1)
290if (child.IsNode)
Semantics\RefExtensionMethodsTests.cs (4)
2144Assert.True(parameter.IsNode); 2163Assert.True(parameter.IsNode); 2182Assert.True(parameter.IsNode); 2201Assert.True(parameter.IsNode);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\SemanticModelAPITests.cs (1)
4660if (child.IsNode)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (10)
Parsing\ParsingTests.cs (1)
278if (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)
295Assert.True(item.IsNode);
Syntax\SyntaxNodeTests.cs (2)
1785Assert.True(nodeOrToken.IsNode); 3488var node = (SyntaxNode)children.First(n => n.IsNode);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CSharpTestBase.cs (1)
1492if (child.IsNode)
SemanticModelTestBase.cs (1)
50if (child.IsNode)
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
Classification\Worker.cs (1)
72Debug.Assert(nodeOrToken.IsNode || nodeOrToken.IsToken);
CSharpTypeInferenceService.TypeInferrer.cs (1)
1872if (child.IsNode)
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (1)
179if (child.IsNode)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
669if (item.IsNode)
ParenthesizedExpressionSyntaxExtensions.cs (1)
356if (nodeOrToken.IsNode && !nodeOrToken.IsKind(SyntaxKind.ParenthesizedExpression))
SeparatedSyntaxListExtensions.cs (1)
20if (!nodesAndTokens.Last().IsNode)
Simplification\Reducers\AbstractCSharpReducer.AbstractReductionRewriter.cs (1)
205if (nodeOrToken.IsNode)
Microsoft.CodeAnalysis.Features (22)
AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
61if (child.IsNode)
AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
61if (child.IsNode)
BracePairs\IBracePairsService.cs (1)
56if (current.IsNode)
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (2)
184if (child.IsNode) 461if (child.IsNode)
EmbeddedLanguages\Classification\AbstractEmbeddedLanguageClassificationService.cs (1)
94if (currentNodeOrToken.IsNode)
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDetectionAnalyzer.cs (1)
71if (child.IsNode)
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDiagnosticAnalyzer.cs (1)
66if (child.IsNode)
EmbeddedLanguages\RegularExpressions\LanguageServices\AbstractRegexDiagnosticAnalyzer.cs (1)
64if (child.IsNode)
ExtractClass\ExtractClassWithDialogCodeAction.cs (1)
189var node = nodeOrToken.IsNode
ExtractMethod\MethodExtractor.CodeGenerator.cs (1)
156if (!methodDefinition.IsNode || methodDefinition.AsNode() == null)
GenerateMember\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
376if (sibling.IsNode)
SpellCheck\AbstractSpellCheckSpanService.cs (2)
64if (child.IsNode) 156if (child.IsNode)
SplitOrMergeIfStatements\AbstractSplitIfStatementCodeRefactoringProvider.cs (1)
91return current.IsNode;
Structure\Syntax\BlockSpanCollector.cs (1)
50if (nodeOrToken.IsNode)
UseNamedMemberInitializerAnalyzer.cs (1)
208if (child.IsNode)
Wrapping\BinaryExpression\AbstractBinaryExpressionWrapper.cs (2)
79Debug.Assert(((i % 2) == 0 && item.IsNode) || 115if (currentNodeOrToken.IsNode && IsValidBinaryExpression(precedence, currentNodeOrToken.AsNode()))
Wrapping\ChainedExpression\AbstractChainedExpressionWrapper.cs (1)
221piece.IsNode &&
Wrapping\ChainedExpression\ChainedExpressionCodeActionComputer.cs (1)
170=> chunk.Sum(s => s.IsNode ? s.AsNode().Width() : s.AsToken().Width());
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (1)
201if (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)
350If child.IsNode Then 376If child.IsNode Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
SyntaxTreeExtensions.vb (1)
129If child.IsNode Then
VisualBasicOrderModifiersDiagnosticAnalyzer.vb (1)
34If child.IsNode Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
SyntaxTokenExtensions.vb (1)
138If n.IsNode AndAlso DirectCast(n.AsNode(), ArgumentSyntax).IsNamed Then
VisualBasicTypeInferenceService.TypeInferrer.vb (1)
991If child.IsNode Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (6)
Utils.vb (6)
59If child.IsNode Then 72Return node.ChildNodesAndTokens().Where(Function(n) n.IsNode). 79Return node.ChildNodesAndTokens().Where(Function(n) n.IsNode). 91Return node.ChildNodesAndTokens().Where(Function(n) n.IsNode). 98Return syntaxTree.GetRoot().ChildNodesAndTokens().Where(Function(n) n.IsNode). 105Return syntaxTree.GetRoot().ChildNodesAndTokens().Where(Function(n) n.IsNode).
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (6)
Utils.vb (6)
59If child.IsNode Then 72Return node.ChildNodesAndTokens().Where(Function(n) n.IsNode). 79Return node.ChildNodesAndTokens().Where(Function(n) n.IsNode). 91Return node.ChildNodesAndTokens().Where(Function(n) n.IsNode). 98Return syntaxTree.GetRoot().ChildNodesAndTokens().Where(Function(n) n.IsNode). 105Return syntaxTree.GetRoot().ChildNodesAndTokens().Where(Function(n) n.IsNode).
Microsoft.CodeAnalysis.VisualBasic.Features (2)
Completion\KeywordRecommenders\PreprocessorDirectives\PreprocessorHelpers.vb (1)
49If child.IsNode Then
VisualBasicOrderModifiersDiagnosticAnalyzer.vb (1)
34If child.IsNode Then
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (3)
DocumentationComments\DocCommentTests.vb (3)
123Assert.True(moduleStatement.IsNode) 154Assert.True(moduleStatement.IsNode) 185Assert.True(moduleStatement.IsNode)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (12)
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 (5)
254If node.IsNode Then 279If list(i).IsNode Then 2179Assert.Equal(sN.IsNode, cS.IsNode) 2518Dim node = children.First(Function(n) n.IsNode).AsNode()
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)
62If nodeOrToken.IsNode Then
CodeCleanup\VisualBasicCodeCleanerService.vb (1)
52If child.IsNode Then
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb\SyntaxTreeExtensions.vb (1)
129If child.IsNode Then
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTokenExtensions.vb\SyntaxTokenExtensions.vb (1)
138If n.IsNode AndAlso DirectCast(n.AsNode(), ArgumentSyntax).IsNamed Then
Simplification\Reducers\AbstractVisualBasicReducer.AbstractReductionRewriter.vb (1)
180If nodeOrToken.IsNode Then
VisualBasicTypeInferenceService.TypeInferrer.vb (1)
991If child.IsNode Then
Microsoft.CodeAnalysis.Workspaces (18)
AnnotationTable.cs (2)
180=> node.GetAnnotatedNodesAndTokens(_annotationKind).Where(nt => nt.IsNode).Select(nt => nt.AsNode()!); 192=> node.GetAnnotatedNodesAndTokens(_annotationKind).Where(nt => nt.IsNode && this.HasAnnotations<TSpecificAnnotation>(nt)).Select(nt => nt.AsNode()!);
FindSymbols\FindLiterals\FindLiteralsSearchEngine.cs (1)
156if (child.IsNode)
FindSymbols\FindReferences\FindReferenceCache.cs (1)
112if (child.IsNode)
FindSymbols\Shared\AbstractSyntaxIndex.cs (1)
143if (child.IsNode)
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (1)
82if (current.IsNode)
FormattingExtensions.cs (2)
299var firstToken = nodeOrToken.IsNode ? nodeOrToken.AsNode()!.GetFirstToken(includeZeroWidth: true) : nodeOrToken.AsToken(); 300var lastToken = nodeOrToken.IsNode ? nodeOrToken.AsNode()!.GetLastToken(includeZeroWidth: true) : nodeOrToken.AsToken();
ReassignedVariable\AbstractReassignedVariableService.cs (2)
70if (child.IsNode) 246if (child.IsNode)
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
653if (tokenOrNode.IsNode)
SemanticModelExtensions.cs (1)
140if (child.IsNode)
Shared\Extensions\SemanticEquivalence.cs (2)
118if (c1.IsNode && c2.IsNode)
Simplification\AbstractSimplificationService.cs (1)
198var isNode = nodeOrToken.IsNode;
SymbolKey.AliasSymbolKey.cs (1)
83if (child.IsNode)
SyntaxNodeOrTokenExtensions.cs (1)
24if (current.IsNode)
SyntaxPath.cs (1)
146nodeOrToken.IsNode &&
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SymbolKeyTests.cs (1)
1444if (child.IsNode)