50 references to SyntaxTree
Microsoft.CodeAnalysis.CSharp (50)
Binder\Binder_Lookup.cs (1)
262bool isSubmissionTree = Compilation.IsSubmissionSyntaxTree(declarationSyntax.SyntaxTree);
Binder\Binder_Statements.cs (1)
3783BinderFactory binderFactory = compilation.GetBinderFactory(containerNode.SyntaxTree);
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
971bool isSubmissionTree = compilation.IsSubmissionSyntaxTree(compilationUnit.SyntaxTree);
Binder\WithExternAndUsingAliasesBinder.cs (1)
180if (declaration.HasGlobalUsings && compilationUnit.SyntaxTree != declaration.SyntaxReference.SyntaxTree)
Compilation\CSharpCompilation.cs (2)
2589return GetBinderFactory(syntax.SyntaxTree).GetBinder(syntax); 2759TryAdd(new ImportInfo(syntax.SyntaxTree, syntax.Kind(), syntax.Span), default);
Compilation\CSharpSemanticModel.cs (2)
1386if (this.Compilation.ContainsSyntaxTree(syntax.SyntaxTree)) 5434var syntaxTree = (CSharpSyntaxTree)Root.SyntaxTree;
Compilation\MemberSemanticModel.cs (2)
1151return _root.SyntaxTree; 2467if (node.SyntaxTree == _semanticModel.SyntaxTree)
Compilation\SpeculativeSyntaxTreeSemanticModel.cs (1)
50: base(parentSemanticModel.Compilation, parentSemanticModel.SyntaxTree, root.SyntaxTree, parentSemanticModel.Options)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (3)
104Debug.Assert(sourceIncludeElementNodes.All(syntax => syntax.SyntaxTree.Options.DocumentationMode < DocumentationMode.Diagnose), 271bool diagnose = originatingSyntax.SyntaxTree.ReportDocumentationCommentDiagnostics(); 539Binder binder = MakeNameBinder(isParameter, isTypeParameterRef, _memberSymbol, _compilation, originatingSyntax.SyntaxTree);
DocumentationComments\SourceDocumentationCommentUtils.cs (1)
35if (syntaxNode.SyntaxTree.Options.DocumentationMode < DocumentationMode.Parse)
Parser\Blender.cs (1)
154var column = oldTree.SyntaxTree.GetLineSpan(new TextSpan(start, 0)).Span.Start.Character;
Symbols\LexicalSortKey.cs (1)
83: this(node.SyntaxTree, node.SpanStart, compilation)
Symbols\NamespaceOrTypeSymbol.cs (1)
227if (loc.IsInSource && loc.SourceTree == syntax.SyntaxTree && syntax.Span.Contains(loc.SourceSpan))
Symbols\Source\ModifierUtils.cs (1)
122if (MessageID.IDS_FeatureRefFields.GetFeatureAvailabilityDiagnosticInfo((CSharpParseOptions)syntax.SyntaxTree.Options) is { } diagnosticInfo)
Symbols\Source\SourceConstructorSymbolBase.cs (3)
36var binderFactory = this.DeclaringCompilation.GetBinderFactory(syntax.SyntaxTree); 176if (tree == ctorSyntax.SyntaxTree) 195if (tree == ctorInitializer?.SyntaxTree)
Symbols\Source\SourceMemberContainerSymbol.cs (1)
3976Debug.Assert(node.SyntaxTree == initializers.Last().Syntax.SyntaxTree);
Symbols\Source\SourceMemberMethodSymbol.cs (2)
745Binder result = (binderFactoryOpt ?? this.DeclaringCompilation.GetBinderFactory(contextNode.SyntaxTree)).GetBinder(contextNode); 1132Debug.Assert(this.SyntaxNode.SyntaxTree == localTree);
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (4)
74if (declarationSyntaxRef.SyntaxTree != declarationSyntax.SyntaxTree) 765declarationBinder ??= compilation.GetBinderFactory(declarationSyntax.SyntaxTree).GetBinder(usingDirective.NamespaceOrType).WithAdditionalFlags(flags); 779diagnostics.Add(!globalUsingNamespacesOrTypes.IsEmpty && getOrCreateUniqueGlobalUsingsNotInTree(ref uniqueGlobalUsings, globalUsingNamespacesOrTypes, declarationSyntax.SyntaxTree).Contains(imported) ? 805diagnostics.Add(!globalUsingNamespacesOrTypes.IsEmpty && getOrCreateUniqueGlobalUsingsNotInTree(ref uniqueGlobalUsings, globalUsingNamespacesOrTypes, declarationSyntax.SyntaxTree).Contains(imported) ?
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
407var binderFactory = compilation.GetBinderFactory(syntax.SyntaxTree);
Symbols\Symbol_Attributes.cs (1)
696var parseOptions = (CSharpParseOptions)targetOpt.SyntaxTree.Options;
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (2)
99if (entryPoint.SyntaxTree == compilationUnit.SyntaxTree && entryPoint.SyntaxNode == compilationUnit) 222Binder result = new BuckStopsHereBinder(compilation, FileIdentifier.Create(syntaxNode.SyntaxTree, compilation.Options.SourceReferenceResolver));
Syntax\CSharpSyntaxNode.cs (16)
43/// Returns a non-null <see cref="SyntaxTree"/> that owns this node. 44/// If this node was created with an explicit non-null <see cref="SyntaxTree"/>, returns that tree. 45/// Otherwise, if this node has a non-null parent, then returns the parent's <see cref="SyntaxTree"/>. 46/// Otherwise, returns a newly created <see cref="SyntaxTree"/> rooted at this node, preserving this node's reference identity. 207return this.SyntaxTree.GetReference(this); 217return this.SyntaxTree.GetDiagnostics(this); 460return this.SyntaxTree; 472return SyntaxReplacer.Replace(this, nodes, computeReplacementNode, tokens, computeReplacementToken, trivia, computeReplacementTrivia).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 477return SyntaxReplacer.ReplaceNodeInList(this, originalNode, replacementNodes).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 482return SyntaxReplacer.InsertNodeInList(this, nodeInList, nodesToInsert, insertBefore).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 487return SyntaxReplacer.ReplaceTokenInList(this, originalToken, newTokens).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 492return SyntaxReplacer.InsertTokenInList(this, originalToken, newTokens, insertBefore).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 497return SyntaxReplacer.ReplaceTriviaInList(this, originalTrivia, newTrivia).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 502return SyntaxReplacer.InsertTriviaInList(this, originalTrivia, newTrivia, insertBefore).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 507return SyntaxNodeRemover.RemoveNodes(this, nodes.Cast<CSharpSyntaxNode>(), options).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 512return SyntaxNormalizer.Normalize(this, indentation, eol, elasticTrivia).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree);
Syntax\CSharpSyntaxTree.cs (1)
392/// <para>NOTE: This method is only intended to be used from <see cref="CSharpSyntaxNode.SyntaxTree"/> property.</para>