355 references to SyntaxTree
Microsoft.AspNetCore.App.Analyzers (4)
Microsoft.CodeAnalysis (21)
DiagnosticAnalyzer\AnalyzerExecutor.cs (10)
520IsAnalyzerSuppressedForTree(analyzer, semanticModel.SyntaxTree, cancellationToken))
525var diagReporter = GetAddSemanticDiagnostic(semanticModel.SyntaxTree, analyzer, cancellationToken);
673Debug.Assert(!IsAnalyzerSuppressedForTree(operationAction.Analyzer, semanticModel.SyntaxTree, cancellationToken));
791var diagReporter = GetAddSemanticDiagnostic(semanticModel.SyntaxTree, declaredNode.FullSpan, analyzer, cancellationToken);
968IsAnalyzerSuppressedForTree(analyzer, model.SyntaxTree, cancellationToken))
973var diagReporter = GetAddSemanticDiagnostic(model.SyntaxTree, spanForContainingTopmostNodeForAnalysis, analyzer, cancellationToken);
997Debug.Assert(!IsAnalyzerSuppressedForTree(analyzer, model.SyntaxTree, cancellationToken));
1069IsAnalyzerSuppressedForTree(analyzer, model.SyntaxTree, cancellationToken))
1074var diagReporter = GetAddSemanticDiagnostic(model.SyntaxTree, spanForContainingOperationBlock, analyzer, cancellationToken);
1097Debug.Assert(!IsAnalyzerSuppressedForTree(analyzer, model.SyntaxTree, cancellationToken));
Microsoft.CodeAnalysis.CodeStyle (17)
Microsoft.CodeAnalysis.CodeStyle.Fixes (12)
Microsoft.CodeAnalysis.CSharp (3)
Microsoft.CodeAnalysis.CSharp.CodeStyle (19)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (18)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (14)
75return semanticModel.SyntaxTree.IsExpressionContext(
77semanticModel.SyntaxTree.FindTokenOnLeftOfPosition(position, cancellationToken),
83return semanticModel.SyntaxTree.IsStatementContext(
84position, semanticModel.SyntaxTree.FindTokenOnLeftOfPosition(position, cancellationToken), cancellationToken);
88=> semanticModel.SyntaxTree.IsTypeContext(position, cancellationToken, semanticModel);
91=> semanticModel.SyntaxTree.IsNamespaceContext(position, cancellationToken, semanticModel);
94=> semanticModel.SyntaxTree.IsNamespaceDeclarationNameContext(position, cancellationToken);
98return semanticModel.SyntaxTree.IsTypeDeclarationContext(
99position, semanticModel.SyntaxTree.FindTokenOnLeftOfPosition(position, cancellationToken), cancellationToken);
104return semanticModel.SyntaxTree.IsMemberDeclarationContext(
105position, semanticModel.SyntaxTree.FindTokenOnLeftOfPosition(position, cancellationToken));
109=> semanticModel.SyntaxTree.IsGlobalStatementContext(position, cancellationToken);
112=> semanticModel.SyntaxTree.IsLabelContext(position, cancellationToken);
115=> semanticModel.SyntaxTree.IsAttributeNameContext(position, cancellationToken);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (5)
Diagnostics\DiagnosticAnalyzerTests.cs (4)
4338? await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel.SyntaxTree, filterSpan, analyzers, CancellationToken.None)
4339: await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel.SyntaxTree, filterSpan, CancellationToken.None);
4344? await compilationWithAnalyzers.GetAnalyzerSyntaxDiagnosticsAsync(semanticModel.SyntaxTree, filterSpan, analyzers, CancellationToken.None)
4345: await compilationWithAnalyzers.GetAnalyzerSyntaxDiagnosticsAsync(semanticModel.SyntaxTree, filterSpan, CancellationToken.None);
Microsoft.CodeAnalysis.CSharp.Features (36)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (9)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (13)
Microsoft.CodeAnalysis.CSharp.Workspaces (27)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (14)
75return semanticModel.SyntaxTree.IsExpressionContext(
77semanticModel.SyntaxTree.FindTokenOnLeftOfPosition(position, cancellationToken),
83return semanticModel.SyntaxTree.IsStatementContext(
84position, semanticModel.SyntaxTree.FindTokenOnLeftOfPosition(position, cancellationToken), cancellationToken);
88=> semanticModel.SyntaxTree.IsTypeContext(position, cancellationToken, semanticModel);
91=> semanticModel.SyntaxTree.IsNamespaceContext(position, cancellationToken, semanticModel);
94=> semanticModel.SyntaxTree.IsNamespaceDeclarationNameContext(position, cancellationToken);
98return semanticModel.SyntaxTree.IsTypeDeclarationContext(
99position, semanticModel.SyntaxTree.FindTokenOnLeftOfPosition(position, cancellationToken), cancellationToken);
104return semanticModel.SyntaxTree.IsMemberDeclarationContext(
105position, semanticModel.SyntaxTree.FindTokenOnLeftOfPosition(position, cancellationToken));
109=> semanticModel.SyntaxTree.IsGlobalStatementContext(position, cancellationToken);
112=> semanticModel.SyntaxTree.IsLabelContext(position, cancellationToken);
115=> semanticModel.SyntaxTree.IsAttributeNameContext(position, cancellationToken);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (11)
Microsoft.CodeAnalysis.Features (25)
Microsoft.CodeAnalysis.Test.Utilities (6)
Microsoft.CodeAnalysis.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic (4)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (6)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (21)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSemanticFactsService.vb (17)
51Dim token = semanticModel.SyntaxTree.GetTargetToken(position, cancellationToken)
52Return semanticModel.SyntaxTree.IsExpressionContext(position, token, cancellationToken, semanticModel)
56Dim token = semanticModel.SyntaxTree.GetTargetToken(position, cancellationToken)
57Return semanticModel.SyntaxTree.IsInterfaceMemberDeclarationKeywordContext(position, token, cancellationToken) OrElse
58semanticModel.SyntaxTree.IsTypeMemberDeclarationKeywordContext(position, token, cancellationToken)
64Dim token = semanticModel.SyntaxTree.GetTargetToken(position, cancellationToken)
65Return semanticModel.SyntaxTree.IsNamespaceContext(position, token, cancellationToken, semanticModel)
69Dim token = semanticModel.SyntaxTree.GetTargetToken(position, cancellationToken)
70Return semanticModel.SyntaxTree.IsSingleLineStatementContext(position, token, cancellationToken) OrElse
71semanticModel.SyntaxTree.IsMultiLineStatementStartContext(position, token, cancellationToken)
77Dim token = semanticModel.SyntaxTree.GetTargetToken(position, cancellationToken)
78Return semanticModel.SyntaxTree.IsTypeContext(position, token, cancellationToken, semanticModel)
82Dim token = semanticModel.SyntaxTree.GetTargetToken(position, cancellationToken)
83Return semanticModel.SyntaxTree.IsTypeDeclarationContext(position, token, cancellationToken)
91Dim tree = semanticModel.SyntaxTree
97Dim tree = semanticModel.SyntaxTree
103Return semanticModel.SyntaxTree.IsNamespaceDeclarationNameContext(position, cancellationToken)
Microsoft.CodeAnalysis.VisualBasic.Features (18)
NavigationBar\VisualBasicNavigationBarItemService.vb (4)
66nodesToVisit.Push(DirectCast(semanticModel.SyntaxTree.GetRoot(cancellationToken), SyntaxNode))
112items.AddIfNotNull(CreateItemForEnum(solution, type, semanticModel.SyntaxTree, symbolDeclarationService))
114items.AddIfNotNull(CreatePrimaryItemForType(solution, type, semanticModel.SyntaxTree, workspaceSupportsDocumentChanges, symbolDeclarationService, cancellationToken))
346Dim methodLocation = GetSymbolLocation(solution, methods.First(), semanticModel.SyntaxTree, symbolDeclarationService)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (35)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSemanticFactsService.vb (17)
51Dim token = semanticModel.SyntaxTree.GetTargetToken(position, cancellationToken)
52Return semanticModel.SyntaxTree.IsExpressionContext(position, token, cancellationToken, semanticModel)
56Dim token = semanticModel.SyntaxTree.GetTargetToken(position, cancellationToken)
57Return semanticModel.SyntaxTree.IsInterfaceMemberDeclarationKeywordContext(position, token, cancellationToken) OrElse
58semanticModel.SyntaxTree.IsTypeMemberDeclarationKeywordContext(position, token, cancellationToken)
64Dim token = semanticModel.SyntaxTree.GetTargetToken(position, cancellationToken)
65Return semanticModel.SyntaxTree.IsNamespaceContext(position, token, cancellationToken, semanticModel)
69Dim token = semanticModel.SyntaxTree.GetTargetToken(position, cancellationToken)
70Return semanticModel.SyntaxTree.IsSingleLineStatementContext(position, token, cancellationToken) OrElse
71semanticModel.SyntaxTree.IsMultiLineStatementStartContext(position, token, cancellationToken)
77Dim token = semanticModel.SyntaxTree.GetTargetToken(position, cancellationToken)
78Return semanticModel.SyntaxTree.IsTypeContext(position, token, cancellationToken, semanticModel)
82Dim token = semanticModel.SyntaxTree.GetTargetToken(position, cancellationToken)
83Return semanticModel.SyntaxTree.IsTypeDeclarationContext(position, token, cancellationToken)
91Dim tree = semanticModel.SyntaxTree
97Dim tree = semanticModel.SyntaxTree
103Return semanticModel.SyntaxTree.IsNamespaceDeclarationNameContext(position, cancellationToken)
Microsoft.CodeAnalysis.Workspaces (36)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.ML.InternalCodeAnalyzer (1)
System.Private.CoreLib.Generators (1)