Skip to content

Move feature-oriented helpers to appropriate location#77611

Merged
CyrusNajmabadi merged 1 commit intodotnet:mainfrom
CyrusNajmabadi:syntaxFacts
Mar 14, 2025
Merged

Move feature-oriented helpers to appropriate location#77611
CyrusNajmabadi merged 1 commit intodotnet:mainfrom
CyrusNajmabadi:syntaxFacts

Conversation

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

ISyntaxFacts is not a dumping ground for individual features to place their logic in a shared location. It is intended to supply a uniform way of talkign to VB/C# when both are identical in syntactic structure.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner March 14, 2025 20:02
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 14, 2025
[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
public CSharpDocumentDifferenceService()
protected override bool IsContainedInMemberBody(SyntaxNode node, TextSpan span)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a move from CSharpSynatxFacts.

Public Sub New()
End Sub

Protected Overrides Function IsContainedInMemberBody(node As SyntaxNode, span As Text.TextSpan) As Boolean
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a move from VisualBasicSyntaxFacts

// Violation. This is a feature level API.
bool ContainsInMemberBody([NotNullWhen(true)] SyntaxNode? node, TextSpan span);
// Violation. This is a feature level API.
TextSpan GetInactiveRegionSpanAroundPosition(SyntaxTree tree, int position, CancellationToken cancellationToken);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've marked apis that currently violate the docs of ISyntaxFacts. i continually try to move things out when i run across them.

Copy link
Copy Markdown
Contributor

@ToddGrun ToddGrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@CyrusNajmabadi CyrusNajmabadi merged commit 3e2d972 into dotnet:main Mar 14, 2025
25 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the syntaxFacts branch March 14, 2025 22:43
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Mar 14, 2025
@jjonescz jjonescz modified the milestones: Next, 17.14 P3 Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants