Skip to content

[libSyntax] Parsing fixes for #if, trailing semicolon, key paths #16155

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 3 commits into from
Apr 25, 2018

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Apr 25, 2018

This PR provides three minor parsing fixes for libSyntax:

  • #if inside type declarations (e.g. members that are only present conditionally)
  • Trailing semicolons after declarations in types
  • Parsing for Swift key paths

@ahoppen ahoppen requested review from rintaro and nkcsgexi April 25, 2018 16:25
@ahoppen
Copy link
Member Author

ahoppen commented Apr 25, 2018

@swift-ci Please smoke test

SyntaxParsingContext DeclContext(SyntaxContext,
SyntaxKind::MemberDeclListItem);
{
SyntaxParsingContext DeclContext(SyntaxContext, SyntaxContextKind::Decl);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this context? it seems parseDecl has its own parsing context in scope.

@ahoppen
Copy link
Member Author

ahoppen commented Apr 25, 2018

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Apr 25, 2018

@swift-ci Please smoke test

@ahoppen ahoppen merged commit 387ef8f into swiftlang:master Apr 25, 2018
@ahoppen ahoppen deleted the if-semi-keypath branch April 26, 2018 14:50
abl pushed a commit to abl/swift that referenced this pull request May 4, 2018
A recent change to SwiftSyntax broke our build: swiftlang#16155

PiperOrigin-RevId: 194541217
allevato pushed a commit to google/swift that referenced this pull request Sep 17, 2018
A recent change to SwiftSyntax broke our build: swiftlang#16155

PiperOrigin-RevId: 194541217
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