Skip to content

libSyntax: support declaration modifiers, like static, private, etc. #13221

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 4, 2017
Merged

libSyntax: support declaration modifiers, like static, private, etc. #13221

merged 4 commits into from
Dec 4, 2017

Conversation

nkcsgexi
Copy link
Contributor

@nkcsgexi nkcsgexi commented Dec 2, 2017

Some declaration modifiers may have more details attached, like
"private(set)". This patch represents the detail part "(set)" as a token
list.

Also, this patch fixes an issue where back tracking scope doesn't
recover leading/trailing trivia information.

Some declaration modifiers may have more details attached, like
"private(set)". This patch represents the detail part "(set)" as a token
list.

Also, this patch fixes an issue where back tracking scope doesn't
recover leading/trailing trivia information.
@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Dec 2, 2017

@swift-ci please smoke test

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Dec 2, 2017

@rintaro could you review this please? especially the part of recovering trivia information.

@rintaro
Copy link
Member

rintaro commented Dec 2, 2017

Could you hold this? This workaround shouldn't be needed if we correctly restore the Lexer state when backtracking. The problem is mismatch between start position of LeadingTrivia and Lexer::getStateForBeginningOfToken(). I'll look into it.

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Dec 2, 2017

Sure, thank you for looking into this! @rintaro

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Dec 4, 2017

@swift-ci please smoke test

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Dec 4, 2017

@swift-ci please smoke test

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Dec 4, 2017

@swift-ci Please clean test Linux platform

@swift-ci
Copy link
Contributor

swift-ci commented Dec 4, 2017

Build failed
Swift Test Linux Platform
Git Sha - b20804e

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Dec 4, 2017

@swift-ci Please clean test Linux platform

@nkcsgexi nkcsgexi merged commit 1a7f191 into swiftlang:master Dec 4, 2017
davidungar pushed a commit to davidungar/swift that referenced this pull request Dec 5, 2017
…wiftlang#13221)

Some declaration modifiers may have more details attached, like
"private(set)". This patch represents the detail part "(set)" as a token
list.
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