Skip to content

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

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
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 DougGregor force-pushed the syntax-decl-cleanup branch from 97c2039 to c5561df Compare July 18, 2022 06:57
@DougGregor
Copy link
Member Author

@DougGregor
Copy link
Member Author

Tested via swiftlang/swift#60052

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.

1 participant