Skip to content

[Parse] Small cleanups in parseBraceItems() #13620

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 2 commits into from
Dec 25, 2017

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Dec 25, 2017

  • Reorder if ... else if branches to simplify conditions.
  • Use SmallVectorImpl::append() instead of for { push_back() }
  • Inline skipExtraTopLevelRBraces(). Removed it from parseTopLevel(). There's no particular reason to diagnose it in parseTopLevel().

* Reorder 'if ... else if' branches to simplify conditions.
* use 'append()' instead of `for { push_back() }`
Removed from 'parseTopLevel()'. There's no particular reason to diagnose
it in 'parseTopLevel()'.
@rintaro
Copy link
Member Author

rintaro commented Dec 25, 2017

@swift-ci Please test

@rintaro rintaro merged commit c1e8bc4 into swiftlang:master Dec 25, 2017
@rintaro
Copy link
Member Author

rintaro commented Dec 25, 2017

@DougGregor Please post-commit review this if you have chance.

@rintaro rintaro deleted the parse-braceitems-reorder branch December 25, 2017 16:54
Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

This is definitely cleaner, thank you!

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.

2 participants