Skip to content

[NFC] Refactor name parsing into parseDeclNameRef() #28801

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

Merged
merged 4 commits into from
Dec 17, 2019

Conversation

beccadax
Copy link
Contributor

The parser currently has two DeclNameRef-parsing functions, parseUnqualifiedDeclName() and parseUnqualifiedDeclBaseName(), which take four undifferentiated bools to control their behavior. I will soon need yet another flag, so this is getting a bit out of hand.

This PR replaces them with a parseDeclNameRef() function and a flag enum to control these behaviors. This should improve the readability of existing code and help accommodate future flag additions.

@beccadax beccadax requested a review from rintaro December 16, 2019 07:51
@beccadax
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - bed2ce4

Copy link
Member

@rintaro rintaro left a comment

Choose a reason for hiding this comment

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

Nice cleanup. Thanks!

@beccadax
Copy link
Contributor Author

@swift-ci please test linux platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - bed2ce4

@beccadax
Copy link
Contributor Author

Possibly a flaky test.

@swift-ci please test linux platform

@beccadax beccadax merged commit 439d99c into swiftlang:master Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants