Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull feature-specific APIs out of ISyntaxFacts #60636

Merged
merged 5 commits into from
Apr 8, 2022

Conversation

CyrusNajmabadi
Copy link
Member

No description provided.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner April 7, 2022 21:38
// Violation. This should return a SyntaxList
IReadOnlyList<SyntaxNode> GetExecutableBlockStatements(SyntaxNode? node);
// Violation. This is a feature level API.
SyntaxNode? FindInnermostCommonExecutableBlock(IEnumerable<SyntaxNode> nodes);
Copy link
Member Author

Choose a reason for hiding this comment

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

ISyntaxFacts defines (in a comment on the type) the sorts of operations it is supposed to provide. Specifically, it only abstracts over common syntax constructs that both VB and C# have (e.g. an 'if statement'). It is not intended to make many constructs from the same language appear similar. For that, we want specific other services/features that are based around that concept and are clear on what their particular semantics are.

@CyrusNajmabadi CyrusNajmabadi merged commit 0f58bba into dotnet:main Apr 8, 2022
@ghost ghost added this to the Next milestone Apr 8, 2022
@dibarbet dibarbet modified the milestones: Next, 17.3.P1 Apr 25, 2022
@CyrusNajmabadi CyrusNajmabadi deleted the syntaxFacts3 branch May 3, 2022 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants