52 references to SyntaxTree
Microsoft.AspNetCore.App.Analyzers (2)
Infrastructure\RouteUsageCache.cs (2)
44if (syntaxToken.SyntaxTree == null) 49var semanticModel = _compilation.GetSemanticModel(syntaxToken.SyntaxTree);
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (1)
148var sourceText = token.SyntaxTree.GetText();
Microsoft.CodeAnalysis (5)
Diagnostic\SourceLocation.cs (1)
32: this(token.SyntaxTree!, token.Span)
Syntax\SyntaxToken.cs (3)
644var tree = SyntaxTree; 663var tree = SyntaxTree; 689/// occurs when a <see cref="SyntaxTree"/> is incrementally parsed using <see cref="SyntaxTree.WithChangedText"/>
Syntax\SyntaxTrivia.cs (1)
402return Token.SyntaxTree;
Microsoft.CodeAnalysis.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (3)
155RoslynDebug.AssertNotNull(baseToken.SyntaxTree); 166var textLine = baseToken.SyntaxTree.GetText(cancellationToken).Lines.GetLineFromPosition(baseToken.SpanStart); 167baseToken = baseToken.SyntaxTree.GetRoot(cancellationToken).FindToken(textLine.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
170var tree = token1.SyntaxTree;
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
49if (IdentifierToken.SyntaxTree != null)
Microsoft.CodeAnalysis.CSharp (8)
Binder\Binder.cs (2)
272RoslynDebug.Assert(token.SyntaxTree is object); 273return AreNullableAnnotationsEnabled(token.SyntaxTree, token.SpanStart);
Binder\Binder_Symbols.cs (1)
2749=> CheckFeatureAvailability(syntax.SyntaxTree!, feature, diagnostics, syntax, static syntax => syntax.GetLocation(), forceWarning: forceWarning);
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (2)
63Debug.Assert(questionToken.SyntaxTree != null); 64var tree = (CSharpSyntaxTree)questionToken.SyntaxTree;
Errors\MessageID.cs (2)
370syntax.SyntaxTree!.Options, 398syntax.SyntaxTree!.Options,
Symbols\LexicalSortKey.cs (1)
91: this(token.SyntaxTree, token.SpanStart, compilation)
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
238var syntaxTree = genericIdentifier.SyntaxTree!;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
347var sourceText = token.SyntaxTree!.GetText(cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Indentation\CSharpSmartTokenFormatter.cs (1)
112RoslynDebug.AssertNotNull(token.SyntaxTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
299var tree = token1.SyntaxTree;
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
140var sourceText = token.SyntaxTree.GetText();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Syntax\SyntaxFactoryTests.cs (4)
450Assert.NotNull(expression.Token.SyntaxTree); 452var expectedLocation = Location.Create(expression.Token.SyntaxTree, TextSpan.FromBounds(0, 2)); 464Assert.NotNull(expression.Token.SyntaxTree); 466var expectedLocation = Location.Create(expression.Token.SyntaxTree, TextSpan.FromBounds(0, 2));
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
238var syntaxTree = genericIdentifier.SyntaxTree!;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
347var sourceText = token.SyntaxTree!.GetText(cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Indentation\CSharpSmartTokenFormatter.cs (1)
112RoslynDebug.AssertNotNull(token.SyntaxTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
299var tree = token1.SyntaxTree;
Microsoft.CodeAnalysis.Features (2)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
62public override SyntaxTree SyntaxTreeToModify => _suppressionTargetInfo.StartToken.SyntaxTree;
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
49if (IdentifierToken.SyntaxTree != null)
Microsoft.CodeAnalysis.VisualBasic (2)
Binding\Binder_Utils.vb (1)
228DirectCast(privateProtectedToken.SyntaxTree, VisualBasicSyntaxTree).Options.LanguageVersion,
Symbols\LexicalSortKey.vb (1)
148Me.New(DirectCast(token.SyntaxTree, VisualBasicSyntaxTree), token.SpanStart, compilation)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTokenExtensions.vb (1)
202Dim text = token.SyntaxTree.GetText()
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTokenExtensions.vb (1)
202Dim text = token.SyntaxTree.GetText()
Microsoft.CodeAnalysis.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (3)
155RoslynDebug.AssertNotNull(baseToken.SyntaxTree); 166var textLine = baseToken.SyntaxTree.GetText(cancellationToken).Lines.GetLineFromPosition(baseToken.SpanStart); 167baseToken = baseToken.SyntaxTree.GetRoot(cancellationToken).FindToken(textLine.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
170var tree = token1.SyntaxTree;
Microsoft.VisualStudio.LanguageServices.CSharp (8)
CodeModel\CSharpCodeModelService.NodeLocator.cs (8)
143? new VirtualTreePoint(openBrace.SyntaxTree, text, text.Lines[openBraceLine.LineNumber + 1].Start) 144: new VirtualTreePoint(openBrace.SyntaxTree, text, openBrace.Span.End); 182return new VirtualTreePoint(openBrace.SyntaxTree, text, lineAfterOpenBrace.Start + firstNonWhitespaceOffset); 194return new VirtualTreePoint(openBrace.SyntaxTree, text, lineAfterOpenBrace.End, virtualSpaces); 202return new VirtualTreePoint(openBrace.SyntaxTree, text, openBrace.Span.End); 206return new VirtualTreePoint(openBrace.SyntaxTree, text, nextPosition); 217? new VirtualTreePoint(closeBrace.SyntaxTree, text, closeBraceLine.Start) 218: new VirtualTreePoint(closeBrace.SyntaxTree, text, closeBrace.SpanStart);