183 references to DescendantTokens
Microsoft.AspNetCore.App.Analyzers (1)
RouteEmbeddedLanguage\RoutePatternAnalyzer.cs (1)
37foreach (var item in root.DescendantTokens())
Microsoft.AspNetCore.App.Analyzers.Test (2)
Infrastructure\AmbiguousRoutePatternComparerTests.cs (1)
82var token = parsedStatement.DescendantTokens().ToArray()[3];
RouteEmbeddedLanguage\RoutePatternParserTests.cs (1)
36var token = parsedStatement.DescendantTokens().ToArray()[3];
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\AnalysisContextInfo.cs (1)
127foreach (var token in node.DescendantTokens(descendIntoTrivia: false))
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1349return root.DescendantTokens().Any(static token => string.Equals(token.ValueText, "GeneratedCode", StringComparison.Ordinal) ||
Microsoft.CodeAnalysis.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
867foreach (var token in root.DescendantTokens(descendIntoChildren: static node => node.ContainsDirectives))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (2)
184foreach (var token in node.DescendantTokens()) 200return SpansPreprocessorDirective(syntaxFacts, nodes.SelectMany(n => n.DescendantTokens()));
Microsoft.CodeAnalysis.CSharp (2)
Syntax\LambdaUtilities.cs (2)
363var oldTokens = oldNode.DescendantTokens(node => node == oldNode || !IsLambdaBodyStatementOrExpression(node)); 364var newTokens = newNode.DescendantTokens(node => node == newNode || !IsLambdaBodyStatementOrExpression(node));
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (1)
330foreach (var token in xmlComment.DescendantTokens())
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
556expression.DescendantTokens(),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
ExtractMethod\MiscTests.cs (2)
49var publicToken = rootWithAnnotation.DescendantTokens().First(t => t.Kind() == SyntaxKind.PublicKeyword); 94var publicToken = rootWithAnnotation.DescendantTokens().First(t => t.Kind() == SyntaxKind.PublicKeyword);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (2)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (1)
36var token = parsedStatement.DescendantTokens().ToArray()[3];
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
34var token = parsedStatement.DescendantTokens().ToArray()[3];
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenInterpolatedString.cs (1)
46foreach (var token in tree.GetRoot().DescendantTokens().Where(t => t.Kind() != SyntaxKind.EndOfFileToken))
Microsoft.CodeAnalysis.CSharp.Features (19)
EditAndContinue\BreakpointSpans.cs (11)
481=> [constructorInitializer.ThisOrBaseKeyword, .. constructorInitializer.ArgumentList.DescendantTokens()]; 497foreach (var token in typeDeclaration.TypeParameterList.DescendantTokens()) 501foreach (var token in typeDeclaration.ParameterList.DescendantTokens()) 509=> baseTypeSyntax.DescendantTokens(); 522foreach (var token in recordDeclaration.TypeParameterList.DescendantTokens()) 537foreach (var token in parameter.Type.DescendantTokens()) 548=> accessor.DescendantTokens(); 860return modifiers.Concat(variableDeclaration.DescendantTokens()).Concat(semicolon); 866return modifiers.Concat(variableDeclaration.Type.DescendantTokens()).Concat(variableDeclarator.DescendantTokens()); 870return variableDeclarator.DescendantTokens();
EditAndContinue\SyntaxComparer.cs (4)
978parameters = simple.Parameter.DescendantTokens(); 1575foreach (var token in node.DescendantTokens()) 1595return ComputeDistance(oldNode.DescendantTokens(), newNode.DescendantTokens());
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
210foreach (var token in statement.DescendantTokens())
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
556expression.DescendantTokens(),
src\Compilers\CSharp\Portable\Syntax\LambdaUtilities.cs (2)
363var oldTokens = oldNode.DescendantTokens(node => node == oldNode || !IsLambdaBodyStatementOrExpression(node)); 364var newTokens = newNode.DescendantTokens(node => node == newNode || !IsLambdaBodyStatementOrExpression(node));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Semantics\MethodTypeInferenceTests.cs (4)
1119var book = (IdentifierNameSyntax)tree.GetRoot().DescendantTokens().Last(t => t.Text == "b").Parent; 1160var author = (IdentifierNameSyntax)tree.GetRoot().DescendantTokens().Last(t => t.Text == "a").Parent; 1201var bookResult = (IdentifierNameSyntax)tree.GetRoot().DescendantTokens().Last(t => t.Text == "bookResult").Parent; 1205var authorResult = (IdentifierNameSyntax)tree.GetRoot().DescendantTokens().Last(t => t.Text == "authorResult").Parent;
Semantics\TopLevelStatementsTests.cs (2)
9708var conversionInTopLevel = speculativeModelInTopLevel.GetConversion(nodeToSpeculate.DescendantTokens().Single(n => n.ValueText == "x").Parent); 9713var conversionOutsideTopLevel = speculativeModelOutsideTopLevel.GetConversion(nodeToSpeculate.DescendantTokens().Single(n => n.ValueText == "x").Parent);
Semantics\UnsafeTests.cs (1)
8345foreach (var nullSyntax in tree.GetCompilationUnitRoot().DescendantTokens().Where(token => token.IsKind(SyntaxKind.NullKeyword)))
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\GetSemanticInfoTests.cs (1)
5913var tokens = tree.GetCompilationUnitRoot().DescendantTokens();
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
3866var node = (IdentifierNameSyntax)tree.GetCompilationUnitRoot().DescendantTokens().Where(t => t.ToString() == "Alias").Last().Parent;
DocumentationComments\CrefTests.cs (2)
5678AssertEx.None(cref.DescendantTokens(descendIntoTrivia: true), token => token.ValueText == null); 5693AssertEx.None(cref.DescendantTokens(descendIntoTrivia: true), token => token.ValueText == null);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (54)
IncrementalParsing\IncrementalParsingTests.cs (1)
3055var tempToken = tempRoot.DescendantTokens().First(t => t.Kind() == SyntaxKind.IdentifierToken);
LexicalAndXml\LexicalTests.cs (1)
3824Assert.False(tree.GetRoot().DescendantTokens().Any(
Parsing\StatementParsingTests.cs (3)
3415var tokens1 = root.DescendantTokens(descendIntoTrivia: false).ToArray(); 3416var tokens2 = root.DescendantTokens(descendIntoTrivia: true).ToArray(); 3442var tokens = root.DescendantTokens(descendIntoTrivia: true).ToArray();
Syntax\StructuredTriviaTests.cs (1)
93var resultList = identExpr.DescendantTokens(t => t.FullSpan.OverlapsWith(new TextSpan(3, 18)));
Syntax\SyntaxAnnotationTests.cs (4)
72var toToken = SyntaxFactory.ParseSyntaxTree(_helloWorldCode).GetCompilationUnitRoot().DescendantTokens().First(); 80var fromToken = SyntaxFactory.ParseSyntaxTree(_helloWorldCode).GetCompilationUnitRoot().DescendantTokens().First(); 89var fromToken = SyntaxFactory.ParseSyntaxTree(_helloWorldCode).GetCompilationUnitRoot().DescendantTokens().First(); 90var toToken = SyntaxFactory.ParseSyntaxTree(_helloWorldCode).GetCompilationUnitRoot().DescendantTokens().First();
Syntax\SyntaxNodeTests.cs (41)
512var tokens = t1.GetCompilationUnitRoot().DescendantTokens().ToList(); 525var tokens = t1.GetCompilationUnitRoot().DescendantTokens().ToList(); 538var tokens = t1.GetCompilationUnitRoot().DescendantTokens().ToList(); 982var tokens = tree.GetCompilationUnitRoot().DescendantTokens().ToList(); 1010var tokens = tree.GetCompilationUnitRoot().DescendantTokens(descendIntoTrivia: true).Where(SyntaxToken.NonZeroWidth).ToList(); 1036var tokens = tree.GetCompilationUnitRoot().DescendantTokens().ToList(); 1059List<SyntaxToken> tokens = syntaxTree.GetRoot().DescendantTokens().ToList(); 1081var tokens = tree.GetCompilationUnitRoot().DescendantTokens().ToList(); 1110var tokens = tree.GetCompilationUnitRoot().DescendantTokens(descendIntoTrivia: true).Where(SyntaxToken.NonZeroWidth).ToList(); 1140var tokens = tree.GetCompilationUnitRoot().DescendantTokens().ToList(); 1164List<SyntaxToken> tokens = syntaxTree.GetRoot().DescendantTokens().ToList(); 1188var tokens = tree.GetCompilationUnitRoot().DescendantTokens().ToList(); 1209List<SyntaxToken> tokens = syntaxTree.GetRoot().DescendantTokens().ToList(); 1230var tokens = tree.GetCompilationUnitRoot().DescendantTokens().ToList(); 1254List<SyntaxToken> tokens = syntaxTree.GetRoot().DescendantTokens().ToList(); 2011var actualTokens = syntaxTree.GetCompilationUnitRoot().DescendantTokens(); 2231var bToken = expr.DescendantTokens().First(t => t.Text == "b"); 2241var tokens = expr.DescendantTokens().Where(t => t.IsKind(SyntaxKind.IdentifierToken)).ToList(); 2268var identifierC = cu.DescendantTokens().First(t => t.Text == "C"); 2299var identifierC = cu.DescendantTokens().First(t => t.Text == "C"); 2317var token = expr.DescendantTokens().First(t => t.IsMissing); 2331var tokens = expr.DescendantTokens(descendIntoTrivia: true).ToList(); 2345var token = cu.DescendantTokens().Single(t => t.Kind() == SyntaxKind.EndOfFileToken); 2372var trivia = expr.DescendantTokens().First(t => t.Text == "a").TrailingTrivia[0]; 2456var b = expr.DescendantTokens().Where(t => t.Text == "b").Select(t => t.Parent.FirstAncestorOrSelf<ArgumentSyntax>()).FirstOrDefault(); 2471var b = expr.DescendantTokens().Where(t => t.Text == "b").Select(t => t.Parent.FirstAncestorOrSelf<ArgumentSyntax>()).FirstOrDefault(); 2487var b = expr.DescendantTokens().Where(t => t.Text == "b").Select(t => t.Parent.FirstAncestorOrSelf<ArgumentSyntax>()).FirstOrDefault(); 2504var b = expr.DescendantTokens().Where(t => t.Text == "b").Select(t => t.Parent.FirstAncestorOrSelf<ArgumentSyntax>()).FirstOrDefault(); 2525var b = expr.DescendantTokens().Where(t => t.Text == "b").Select(t => t.Parent.FirstAncestorOrSelf<ArgumentSyntax>()).FirstOrDefault(); 2544var b = expr.DescendantTokens().Where(t => t.Text == "b").Select(t => t.Parent.FirstAncestorOrSelf<ArgumentSyntax>()).FirstOrDefault(); 2560var b = expr.DescendantTokens().Where(t => t.Text == "b").Select(t => t.Parent.FirstAncestorOrSelf<ArgumentSyntax>()).FirstOrDefault(); 2576var b = expr.DescendantTokens().Where(t => t.Text == "b").Select(t => t.Parent.FirstAncestorOrSelf<ArgumentSyntax>()).FirstOrDefault(); 2592var b = expr.DescendantTokens().Where(t => t.Text == "b").Select(t => t.Parent.FirstAncestorOrSelf<ArgumentSyntax>()).FirstOrDefault(); 2612var b = expr.DescendantTokens().Where(t => t.Text == "b").Select(t => t.Parent.FirstAncestorOrSelf<ArgumentSyntax>()).FirstOrDefault(); 2629var n = expr.DescendantTokens().Where(t => t.Text == "a").Select(t => t.Parent.FirstAncestorOrSelf<ArgumentSyntax>()).FirstOrDefault(); 2643var n = expr.DescendantTokens().Where(t => t.Text == "a").Select(t => t.Parent.FirstAncestorOrSelf<ArgumentSyntax>()).FirstOrDefault(); 2657var n = expr.DescendantTokens().Where(t => t.Text == "c").Select(t => t.Parent.FirstAncestorOrSelf<ArgumentSyntax>()).FirstOrDefault(); 2671var b = expr.DescendantTokens().Where(t => t.Text == "b").Select(t => t.Parent.FirstAncestorOrSelf<StatementSyntax>()).FirstOrDefault(); 2685var b = expr.DescendantTokens().Where(t => t.Text == "b").Select(t => t.Parent.FirstAncestorOrSelf<StatementSyntax>()).FirstOrDefault(); 3354foreach (var t in syntaxTree.GetCompilationUnitRoot().DescendantTokens()) 3419Assert.True(compilationUnit.DescendantTokens(node => true).
Syntax\SyntaxRewriterTests.cs (3)
337var tokenT = tree.GetCompilationUnitRoot().DescendantTokens().Where(t => t.ToString() == "T").Single(); 426var privateToken = root.DescendantTokens().First(); 444var publicToken = root.DescendantTokens().First();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
488foreach (var token in root.DescendantTokens())
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Simplification\CSharpSimplificationService.Expander.cs (1)
723var leftTokens = expression.DescendantTokens();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (1)
330foreach (var token in xmlComment.DescendantTokens())
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Formatting\FormattingTriviaTests.cs (1)
1786tree = tree.ReplaceTokens(tree.DescendantTokens(descendIntoTrivia: true)
Microsoft.CodeAnalysis.Features (3)
ExtractMethod\MethodExtractor.Analyzer.SymbolMapBuilder.cs (1)
59foreach (var token in node.DescendantTokens())
ExtractMethod\MethodExtractor.VariableSymbol.cs (1)
287foreach (var token in declStatement.DescendantTokens())
Snippets\SnippetProviders\AbstractSnippetProvider.cs (1)
127var allTokens = node.DescendantTokens(descendIntoTrivia: true).ToList();
Microsoft.CodeAnalysis.Test.Utilities (2)
Syntax\TokenUtilities.cs (2)
88return node.DescendantTokens().Where(t => !SkipCSharpToken(t)).ToList(); 92return node.DescendantTokens().Where(t => !SkipVisualBasicToken(t)).ToList();
Microsoft.CodeAnalysis.UnitTests (2)
CommonSyntaxTests.cs (2)
86SyntaxToken token = node.DescendantTokens().Single(); 102SyntaxToken token = node.DescendantTokens().Single();
Microsoft.CodeAnalysis.VisualBasic (2)
Syntax\LambdaUtilities.vb (2)
612Dim oldTokens = oldNode.DescendantTokens(Function(node) node Is oldNode OrElse Not IsLambdaBodyStatementOrExpression(node)) 613Dim newTokens = newNode.DescendantTokens(Function(node) node Is newNode OrElse Not IsLambdaBodyStatementOrExpression(node))
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\ImportsClauseComparer.vb (2)
56Dim tokens1 = xmlName1.DescendantTokens().Where(Function(t) t.Kind = SyntaxKind.IdentifierToken).ToList() 57Dim tokens2 = xmlName2.DescendantTokens().Where(Function(t) t.Kind = SyntaxKind.IdentifierToken).ToList()
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.vb (1)
288For Each token In xmlComment.DescendantTokens()
Microsoft.CodeAnalysis.VisualBasic.Features (16)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (2)
218If eventExpression.DescendantTokens().Where(Function(n) n.IsKind(SyntaxKind.MeKeyword, SyntaxKind.MyClassKeyword)).Any Then 221ElseIf eventExpression.DescendantTokens().Where(Function(n) n.IsKind(SyntaxKind.MyBaseKeyword)).Any Then
EditAndContinue\DeclarationBody\FieldOrPropertyDeclarationBody.vb (1)
127Return InitializerActiveStatement.DescendantTokens()
EditAndContinue\DeclarationBody\FieldWithMultipleAsNewClauseDeclarationBody.vb (2)
53Return InitializerActiveStatement.DescendantTokens().Concat(OtherActiveStatementContainer.DescendantTokens())
EditAndContinue\DeclarationBody\PropertyWithInitializerDeclarationBody.vb (2)
44If(PropertyStatement.AsClause?.DescendantTokens(), Array.Empty(Of SyntaxToken))).Concat(PropertyStatement.Initializer.DescendantTokens())
EditAndContinue\DeclarationBody\PropertyWithNewClauseDeclarationBody.vb (1)
43Return SpecializedCollections.SingletonEnumerable(PropertyStatement.Identifier).Concat(PropertyStatement.AsClause.DescendantTokens())
EditAndContinue\SyntaxComparer.vb (5)
1085Return New With {lambda.SubOrFunctionHeader, .Body = lambda.Body.DescendantTokens()} 1356For Each token In node.DescendantTokens() 1367For Each token In node.DescendantTokens() 1384Return ComputeDistance(oldNode.DescendantTokens(), newNode.DescendantTokens())
ExtractMethod\VisualBasicMethodExtractor.PostProcessor.vb (1)
156For Each token In statement.DescendantTokens()
src\Compilers\VisualBasic\Portable\Syntax\LambdaUtilities.vb (2)
612Dim oldTokens = oldNode.DescendantTokens(Function(node) node Is oldNode OrElse Not IsLambdaBodyStatementOrExpression(node)) 613Dim newTokens = newNode.DescendantTokens(Function(node) node Is newNode OrElse Not IsLambdaBodyStatementOrExpression(node))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (34)
IncrementalParser\IncrementalParser.vb (2)
1712Dim tempToken2 = tempRoot2.DescendantTokens().First(Function(t) t.Kind = SyntaxKind.IdentifierToken) 2560Return root.DescendantTokens().Select(Function(t) DirectCast(t.Node, InternalSyntax.VisualBasicSyntaxNode)).ToArray()
Parser\ParseStatements.vb (4)
4359Dim tokens = tree.GetRoot().DescendantTokens().ToArray() 7879Dim tokens1 = root.DescendantTokens(descendIntoTrivia:=False).ToArray() 7880Dim tokens2 = root.DescendantTokens(descendIntoTrivia:=True).ToArray() 7906Dim tokens = root.DescendantTokens(descendIntoTrivia:=True).ToArray()
Syntax\SyntaxAnnotationTests.vb (4)
64Dim toToken = VisualBasicSyntaxTree.ParseText(_helloWorldCode).GetRoot().DescendantTokens().First() 71Dim fromToken = VisualBasicSyntaxTree.ParseText(_helloWorldCode).GetRoot().DescendantTokens().First() 79Dim fromToken = VisualBasicSyntaxTree.ParseText(_helloWorldCode).GetRoot().DescendantTokens().First() 80Dim toToken = VisualBasicSyntaxTree.ParseText(_helloWorldCode).GetRoot().DescendantTokens().First()
Syntax\SyntaxFactsTest.vb (2)
1019Dim tokens = cu.DescendantTokens(descendIntoTrivia:=False) 1118Dim tokens = cu.DescendantTokens(descendIntoTrivia:=False)
Syntax\SyntaxRewriterTests.vb (2)
595Dim privateToken = root.DescendantTokens().First() 613Dim publicToken = root.DescendantTokens().First()
TestSyntaxNodes.vb (20)
1475Dim bToken = expr.DescendantTokens().First(Function(t) t.Text = "b") 1484Dim tokens = expr.DescendantTokens().Where(Function(t) t.IsKind(SyntaxKind.IdentifierToken)).ToList() 1521Dim identifierC = cu.DescendantTokens().First(Function(t) t.Text = "C") 1559Dim identifierC = cu.DescendantTokens().First(Function(t) t.Text = "C") 1574Dim trivia = expr.DescendantTokens().First(Function(t) t.Text = "a").TrailingTrivia(0) 2214Dim tokens As List(Of SyntaxToken) = tree.GetRoot().DescendantTokens().ToList() 2238Dim lastToken = tree.GetRoot().DescendantTokens().Last 2536Dim b = expr.DescendantTokens().Where(Function(t) t.ToString() = "b").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ArgumentSyntax)()).FirstOrDefault() 2550Dim n = expr.DescendantTokens().Where(Function(t) t.ToString() = "b").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ArgumentSyntax)()).FirstOrDefault() 2564Dim b = expr.DescendantTokens().Where(Function(t) t.ToString() = "b").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ArgumentSyntax)()).FirstOrDefault() 2578Dim b = expr.DescendantTokens().Where(Function(t) t.ToString() = "b").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ArgumentSyntax)()).FirstOrDefault() 2591Dim n = expr.DescendantTokens().Where(Function(t) t.ToString() = "a").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ArgumentSyntax)()).FirstOrDefault() 2604Dim n = expr.DescendantTokens().Where(Function(t) t.ToString() = "a").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ArgumentSyntax)()).FirstOrDefault() 2617Dim n = expr.DescendantTokens().Where(Function(t) t.ToString() = "c").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ArgumentSyntax)()).FirstOrDefault() 2641Dim n = cu.DescendantTokens().Where(Function(t) t.ToString() = "A").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of AttributeListSyntax)()).FirstOrDefault() 2666Dim n = cu.DescendantTokens().Where(Function(t) t.ToString() = "C").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of AttributeListSyntax)()).FirstOrDefault() 2691Dim n = cu.DescendantTokens().Where(Function(t) t.ToString() = "B").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of AttributeListSyntax)()).FirstOrDefault() 2722Dim n = cu.DescendantTokens().Where(Function(t) t.ToString() = "Goo").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ClassBlockSyntax)()).FirstOrDefault() 2761Dim n = cu.DescendantTokens().Where(Function(t) t.ToString() = "Goo").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ClassBlockSyntax)()).FirstOrDefault() 2803Dim n = cu.DescendantTokens().Where(Function(t) t.ToString() = "Goo").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ClassBlockSyntax)()).FirstOrDefault()
Microsoft.CodeAnalysis.VisualBasic.Workspaces (5)
CodeCleanup\Providers\AddMissingTokensCodeCleanupProvider.vb (1)
229If Not node.DescendantTokens().Any(Function(token) token = previousToken) AndAlso prevTrailingTrivia.Count > 0 Then
CodeCleanup\VisualBasicCodeCleanerService.vb (1)
90Return node.DescendantTokens().Any(
Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.vb (1)
288For Each token In xmlComment.DescendantTokens()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\ImportsClauseComparer.vb (2)
56Dim tokens1 = xmlName1.DescendantTokens().Where(Function(t) t.Kind = SyntaxKind.IdentifierToken).ToList() 57Dim tokens2 = xmlName2.DescendantTokens().Where(Function(t) t.Kind = SyntaxKind.IdentifierToken).ToList()
Microsoft.CodeAnalysis.Workspaces (7)
FindSymbols\FindReferences\Finders\AbstractMemberScopedReferenceFinder.cs (1)
117foreach (var token in syntax.DescendantTokens())
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (1)
138foreach (var token in container.DescendantTokens())
FindSymbols\FindReferences\FindReferenceCache.cs (1)
228foreach (var token in constructor.DescendantTokens(descendIntoTrivia: false))
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
370.DescendantTokens()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
867foreach (var token in root.DescendantTokens(descendIntoChildren: static node => node.ContainsDirectives))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (2)
184foreach (var token in node.DescendantTokens()) 200return SpansPreprocessorDirective(syntaxFacts, nodes.SelectMany(n => n.DescendantTokens()));
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
VisualStudioMSBuildWorkspaceTests.cs (3)
62var type = tree.GetRoot().DescendantTokens().First(t => t.ToString() == "class").Parent; 440var type = tree.GetRoot().DescendantTokens().First(t => t.ToString() == "class").Parent; 2848var type = tree.GetRoot().DescendantTokens().First(t => t.ToString() == "class").Parent;
Microsoft.ML.InternalCodeAnalyzer (1)
ContractsCheckNameofFixProvider.cs (1)
73var sameNameNodes = argList.DescendantTokens().Where(tok => tok.Text == nameArgValue)