-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[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
Conversation
Initializer declarations were missing support for `async`, in part because they deplicated most of the `FunctionSignature` production. Instead, use `FunctionSignature` consistently and let the presence of a result type be a semantic error.
This helps unify the parse trees with function declarations.
@swift-ci please clean test |
swiftlang/swift-syntax#499 @swift-ci please clean test |
2 similar comments
swiftlang/swift-syntax#499 @swift-ci please clean test |
swiftlang/swift-syntax#499 @swift-ci please clean test |
swiftlang/swift-syntax#499 @swift-ci please test macOS |
1 similar comment
swiftlang/swift-syntax#499 @swift-ci please test macOS |
swiftlang/swift-syntax#499 @swift-ci please test macOS |
2 similar comments
swiftlang/swift-syntax#499 @swift-ci please test macOS |
swiftlang/swift-syntax#499 @swift-ci please test macOS |
Different spurious failure, this time from LLDB. Trying again... |
swiftlang/swift-syntax#499 @swift-ci please test macOS |
Collected cleanups for the declaration grammar used by SwiftSyntax/libSyntax:
ActorDecl
into its own syntax node, separate fromClassDecl
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 declarationsTypeAliasDecl
's initializer (the= type
) is not optional, so remove its optionality