107 references to SyntaxTree
Microsoft.CodeAnalysis.CSharp (107)
Binder\Binder_Attributes.cs (1)
115bool isConditionallyOmitted = binder.IsAttributeConditionallyOmitted(attribute.AttributeClass, attributeSyntax.SyntaxTree, ref useSiteInfo);
Binder\Binder_Crefs.cs (4)
1105Debug.Assert(typeArgumentSyntax.ContainsDiagnostics || !typeArgumentSyntax.SyntaxTree.ReportDocumentationCommentDiagnostics() || 1167Debug.Assert(!this.Compilation.ContainsSyntaxTree(typeSyntax.SyntaxTree) || 1168this.Compilation.GetBinderFactory(typeSyntax.SyntaxTree).GetBinder(typeSyntax).Flags == 1195Debug.Assert(type.TypeKind != TypeKind.Error || typeSyntax.ContainsDiagnostics || !typeSyntax.SyntaxTree.ReportDocumentationCommentDiagnostics(), "Why wasn't there a diagnostic?");
Binder\Binder_Expressions.cs (3)
2337return node.SyntaxTree == declarator.SyntaxTree; 7536diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_LowercaseEllSuffix), Location.Create(node.SyntaxTree, new TextSpan(token.Span.End - 1, 1))); 7540diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_LowercaseEllSuffix), Location.Create(node.SyntaxTree, new TextSpan(token.Span.End - 2, 1)));
Binder\Binder_InterpolatedString.cs (1)
78var text = node.SyntaxTree.GetText();
Binder\Binder_Lookup.cs (1)
307bool isSubmissionTree = Compilation.IsSubmissionSyntaxTree(declarationSyntax.SyntaxTree);
Binder\Binder_Operators.cs (2)
4859((CSharpParseOptions)node.SyntaxTree.Options).IsFeatureEnabled(MessageID.IDS_FeaturePatternMatching)) 4954if (wasUnderscore && ((CSharpParseOptions)node.SyntaxTree.Options).IsFeatureEnabled(MessageID.IDS_FeatureRecursivePatterns))
Binder\Binder_Patterns.cs (1)
1513Debug.Assert(designation.SyntaxTree.Options.Kind != SourceCodeKind.Regular);
Binder\Binder_Query.cs (1)
737SourceLocation errorLocation = new SourceLocation(let.SyntaxTree, new TextSpan(let.Identifier.SpanStart, let.Expression.Span.End - let.Identifier.SpanStart));
Binder\Binder_Statements.cs (3)
3471return Location.Create(lambdaSyntax.SyntaxTree, 3475return Location.Create(anonymousMethodSyntax.SyntaxTree, 3960BinderFactory binderFactory = compilation.GetBinderFactory(containerNode.SyntaxTree);
Binder\BinderFactory.BinderFactoryVisitor.cs (2)
975bool isSubmissionTree = compilation.IsSubmissionSyntaxTree(compilationUnit.SyntaxTree); 1279if (primaryConstructor.SyntaxRef.SyntaxTree == memberSyntax.SyntaxTree &&
Binder\SwitchBinder.cs (1)
36((CSharpParseOptions)SwitchSyntax.SyntaxTree.Options)?.IsFeatureEnabled(MessageID.IDS_FeaturePatternMatching) != false;
Binder\WithExternAndUsingAliasesBinder.cs (1)
180if (declaration.HasGlobalUsings && compilationUnit.SyntaxTree != declaration.SyntaxReference.SyntaxTree)
CodeGen\CodeGenerator.cs (1)
343EmitSequencePoint(blockSyntax.SyntaxTree, blockSyntax.CloseBraceToken.Span);
Compilation\CSharpCompilation.cs (6)
1318RoslynDebug.Assert(directive.SyntaxTree.FilePath is object); 1321return ReferenceDirectiveMap.TryGetValue((directive.SyntaxTree.FilePath, directive.File.ValueText), out reference) ? reference : null; 2595var key = (node.SyntaxTree.GetText().GetContentHash(), node.Position); 2710return GetBinderFactory(syntax.SyntaxTree).GetBinder(syntax); 2880TryAdd(new ImportInfo(syntax.SyntaxTree, syntax.Kind(), syntax.Span), default); 2886_lazyImportInfos.TryUpdate(new ImportInfo(syntax.SyntaxTree, syntax.Kind(), syntax.Span), dependencies, default);
Compilation\CSharpSemanticModel.cs (3)
1402if (this.Compilation.ContainsSyntaxTree(syntax.SyntaxTree)) 5300&& primaryConstructor.SyntaxRef.SyntaxTree == node.SyntaxTree 5502var syntaxTree = (CSharpSyntaxTree)Root.SyntaxTree;
Compilation\MemberSemanticModel.cs (4)
1190return _root.SyntaxTree; 2460if (node.SyntaxTree == _semanticModel.SyntaxTree) 2489if (statement.WasCompilerGenerated && node.SyntaxTree == _semanticModel.SyntaxTree) 2514if (node.SyntaxTree == _semanticModel.SyntaxTree)
Compilation\SpeculativeSyntaxTreeSemanticModel.cs (1)
50: base(parentSemanticModel.Compilation, parentSemanticModel.SyntaxTree, root.SyntaxTree, parentSemanticModel.Options)
Compiler\DocumentationCommentCompiler.cs (2)
661bool reportDiagnosticsForCurrentTrivia = trivia.SyntaxTree.ReportDocumentationCommentDiagnostics(); 699Location location = new SourceLocation(trivia.SyntaxTree, new TextSpan(trivia.SpanStart, 0));
Compiler\DocumentationCommentCompiler.DocumentationCommentWalker.cs (2)
149BinderFactory factory = _compilation.GetBinderFactory(cref.SyntaxTree); 186BinderFactory factory = _compilation.GetBinderFactory(nameAttr.SyntaxTree);
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (4)
104Debug.Assert(sourceIncludeElementNodes.All(syntax => syntax.SyntaxTree.Options.DocumentationMode < DocumentationMode.Diagnose), 271bool diagnose = originatingSyntax.SyntaxTree.ReportDocumentationCommentDiagnostics(); 516Binder binder = BinderFactory.MakeCrefBinder(crefSyntax, memberDeclSyntax, _compilation.GetBinderFactory(memberDeclSyntax.SyntaxTree)); 539Binder binder = MakeNameBinder(isParameter, isTypeParameterRef, _memberSymbol, _compilation, originatingSyntax.SyntaxTree);
Declarations\DeclarationTreeBuilder.cs (1)
254syntaxReference: firstGlobalStatement.SyntaxTree.GetReference(firstGlobalStatement.Parent),
DocumentationComments\SourceDocumentationCommentUtils.cs (1)
35if (syntaxNode.SyntaxTree.Options.DocumentationMode < DocumentationMode.Parse)
FlowAnalysis\NullableWalker.cs (1)
9712location = Location.Create(lambdaSyntax.SyntaxTree, new Text.TextSpan(start, lambdaSyntax.ArrowToken.Span.End - start));
Parser\Blender.cs (1)
151var column = oldTree.SyntaxTree.GetLineSpan(new TextSpan(start, 0)).Span.Start.Character;
Symbols\AliasSymbol.cs (1)
401.GetBinderFactory(syntax.SyntaxTree)
Symbols\ConstantValueUtils.cs (1)
37var binderFactory = compilation.GetBinderFactory(equalsValueNode.SyntaxTree);
Symbols\Extensions\SynthesizedExtensionMarker.cs (1)
75BinderFactory binderFactory = this.DeclaringCompilation.GetBinderFactory(parameterList.SyntaxTree);
Symbols\LexicalSortKey.cs (1)
83: this(node.SyntaxTree, node.SpanStart, compilation)
Symbols\NamespaceOrTypeSymbol.cs (1)
228if (loc.IsInSource && loc.SourceTree == syntax.SyntaxTree && syntax.Span.Contains(loc.SourceSpan))
Symbols\Source\ModifierUtils.cs (1)
131if (MessageID.IDS_FeatureRefFields.GetFeatureAvailabilityDiagnosticInfo((CSharpParseOptions)syntax.SyntaxTree.Options) is { } diagnosticInfo)
Symbols\Source\SourceAssemblySymbol.cs (4)
1684QuickAttributeChecker checker = this.DeclaringCompilation.GetBinderFactory(node.SyntaxTree).GetBinder(node).QuickAttributeChecker; 1690QuickAttributeChecker checker = this.DeclaringCompilation.GetBinderFactory(node.SyntaxTree).GetBinder(node).QuickAttributeChecker; 1696QuickAttributeChecker checker = this.DeclaringCompilation.GetBinderFactory(node.SyntaxTree).GetBinder(node).QuickAttributeChecker; 1763this.DeclaringCompilation.GetBinderFactory(node.SyntaxTree).GetBinder(node).QuickAttributeChecker;
Symbols\Source\SourceConstructorSymbolBase.cs (3)
37var binderFactory = this.DeclaringCompilation.GetBinderFactory(syntax.SyntaxTree); 186if (tree == ctorSyntax.SyntaxTree) 205if (tree == ctorInitializer?.SyntaxTree)
Symbols\Source\SourceMemberContainerSymbol.cs (5)
3494Debug.Assert(declaredMembers.DeclarationWithParameters.SyntaxTree == InstanceInitializersForPositionalMembers[0].Syntax.SyntaxTree); 3520declaredMembers.DeclarationWithParameters.SyntaxTree == declaredMembers.InstanceInitializers[insertAt][0].Syntax.SyntaxTree && 3542Debug.Assert(!declaredMembers.InstanceInitializers.Any(g => declaredMembers.DeclarationWithParameters.SyntaxTree == g[0].Syntax.SyntaxTree && 4713Debug.Assert(node.SyntaxTree == initializers.Last().Syntax.SyntaxTree); 4962var binderFactory = compilation.GetBinderFactory(declaredMembersAndInitializers.DeclarationWithParameters.SyntaxTree);
Symbols\Source\SourceMemberFieldSymbol.cs (1)
686return fieldDeclaration.SyntaxTree.HasCompilationUnitRoot && fieldDeclaration.Span.IntersectsWith(definedWithinSpan.Value);
Symbols\Source\SourceMemberMethodSymbol.cs (2)
786Binder result = (binderFactoryOpt ?? this.DeclaringCompilation.GetBinderFactory(contextNode.SyntaxTree)).GetBinder(contextNode); 1146Debug.Assert(this.SyntaxNode.SyntaxTree == localTree);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (3)
1000if (!hasError && !CallsAreOmitted(arguments.AttributeSyntaxOpt.SyntaxTree)) 1043var interceptorsNamespaces = ((CSharpParseOptions)attributeNameSyntax.SyntaxTree.Options).InterceptorsNamespaces; 1180var interceptorsNamespaces = ((CSharpParseOptions)attributeSyntax.SyntaxTree.Options).InterceptorsNamespaces;
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (6)
74if (declarationSyntaxRef.SyntaxTree != declarationSyntax.SyntaxTree) 766declarationBinderSafe ??= compilation.GetBinderFactory(declarationSyntax.SyntaxTree).GetBinder(usingDirective.NamespaceOrType).WithAdditionalFlags(BinderFlags.SuppressConstraintChecks); 792diagnostics.Add(!globalUsingNamespacesOrTypes.IsEmpty && getOrCreateUniqueGlobalUsingsNotInTree(ref uniqueGlobalUsings, globalUsingNamespacesOrTypes, declarationSyntax.SyntaxTree).Contains(imported) ? 818diagnostics.Add(!globalUsingNamespacesOrTypes.IsEmpty && getOrCreateUniqueGlobalUsingsNotInTree(ref uniqueGlobalUsings, globalUsingNamespacesOrTypes, declarationSyntax.SyntaxTree).Contains(imported) ? 1070if (!Compilation.ReportUnusedImportsInTree(alias.ExternAliasDirective!.SyntaxTree)) 1094if (Compilation.ReportUnusedImportsInTree(usingDirective.SyntaxTree))
Symbols\Source\SourceOrdinaryMethodSymbol.cs (3)
118var withTypeParamsBinder = this.DeclaringCompilation.GetBinderFactory(syntax.SyntaxTree).GetBinder(syntax.ReturnType, syntax, this); 1109.GetBinderFactory(syntax.SyntaxTree) 1136.GetBinderFactory(syntax.SyntaxTree)
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
435var binderFactory = compilation.GetBinderFactory(syntax.SyntaxTree);
Symbols\Source\SourcePropertySymbol.cs (1)
53((CSharpParseOptions)syntax.SyntaxTree.Options).IsFeatureEnabled(MessageID.IDS_FeatureFieldKeyword));
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
316GetBinderFactory(declarationSyntax.SyntaxTree).GetBinder(returnTypeSyntax, declarationSyntax, this);
Symbols\Symbol_Attributes.cs (1)
709var parseOptions = (CSharpParseOptions)targetOpt.SyntaxTree.Options;
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (2)
112InMethodBinder result = (binderFactoryOpt ?? this.DeclaringCompilation.GetBinderFactory(typeDecl.SyntaxTree)).GetPrimaryConstructorInMethodBinder(this); 177if (attributeDeclarationSyntax.SyntaxTree == SyntaxRef.SyntaxTree &&
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (2)
99if (entryPoint.SyntaxTree == compilationUnit.SyntaxTree && entryPoint.SyntaxNode == compilationUnit) 238Binder result = new BuckStopsHereBinder(compilation, FileIdentifier.Create(syntaxNode.SyntaxTree, compilation.Options.SourceReferenceResolver));
Syntax\CSharpSyntaxNode.cs (16)
41/// Returns a non-null <see cref="SyntaxTree"/> that owns this node. 42/// If this node was created with an explicit non-null <see cref="SyntaxTree"/>, returns that tree. 43/// Otherwise, if this node has a non-null parent, then returns the parent's <see cref="SyntaxTree"/>. 44/// Otherwise, returns a newly created <see cref="SyntaxTree"/> rooted at this node, preserving this node's reference identity. 205return this.SyntaxTree.GetReference(this); 215return this.SyntaxTree.GetDiagnostics(this); 458return this.SyntaxTree; 470return SyntaxReplacer.Replace(this, nodes, computeReplacementNode, tokens, computeReplacementToken, trivia, computeReplacementTrivia).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 475return SyntaxReplacer.ReplaceNodeInList(this, originalNode, replacementNodes).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 480return SyntaxReplacer.InsertNodeInList(this, nodeInList, nodesToInsert, insertBefore).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 485return SyntaxReplacer.ReplaceTokenInList(this, originalToken, newTokens).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 490return SyntaxReplacer.InsertTokenInList(this, originalToken, newTokens, insertBefore).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 495return SyntaxReplacer.ReplaceTriviaInList(this, originalTrivia, newTrivia).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 500return SyntaxReplacer.InsertTriviaInList(this, originalTrivia, newTrivia, insertBefore).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 505return SyntaxNodeRemover.RemoveNodes(this, nodes.Cast<CSharpSyntaxNode>(), options).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree); 510return SyntaxNormalizer.Normalize(this, indentation, eol, elasticTrivia).AsRootOfNewTreeWithOptionsFrom(this.SyntaxTree);
Syntax\CSharpSyntaxTree.cs (1)
391/// <para>NOTE: This method is only intended to be used from <see cref="CSharpSyntaxNode.SyntaxTree"/> property and <c>SyntaxFactory.Parse*</c> methods.</para>
Syntax\SyntaxFacts.cs (1)
540return IsTopLevelStatement(syntax) && syntax.SyntaxTree.Options.Kind == SourceCodeKind.Regular;