Skip to content

[Syntax] Clean up syntax grammar for declaration nodes #60052

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 10 commits into from
Jul 20, 2022

Conversation

DougGregor
Copy link
Member

Collected cleanups for the declaration grammar used by SwiftSyntax/libSyntax:

  • Split ActorDecl into its own syntax node, separate from ClassDecl
  • Update the list of declaration modifiers to match that of the language
  • Use FunctionSignature for initializers rather than its own parameter clause, which picks up (e.g.) proper support for async and the experimental reasync, and also unifies their parameter lists with that of function declarations
  • Factored out the "detail" of a decl modifier, so we have an optional parenthesized detail list rather than optional components
  • TypeAliasDecl's initializer (the = type) is not optional, so remove its optionality

@DougGregor
Copy link
Member Author

swiftlang/swift-syntax#499

@swift-ci please clean test

@DougGregor
Copy link
Member Author

2 similar comments
@DougGregor
Copy link
Member Author

@DougGregor
Copy link
Member Author

@DougGregor
Copy link
Member Author

@DougGregor
Copy link
Member Author

1 similar comment
@DougGregor
Copy link
Member Author

@DougGregor
Copy link
Member Author

@DougGregor
Copy link
Member Author

2 similar comments
@DougGregor
Copy link
Member Author

@DougGregor
Copy link
Member Author

@DougGregor
Copy link
Member Author

Different spurious failure, this time from LLDB. Trying again...

@DougGregor
Copy link
Member Author

@DougGregor DougGregor merged commit 3e53290 into swiftlang:main Jul 20, 2022
@DougGregor DougGregor deleted the syntax-decl-cleanup branch July 20, 2022 23:09
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