mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Macros] Update the name and argument list for the function body macro
that wraps a function or closure body in a new top-level task.
This commit is contained in:
@@ -47,19 +47,6 @@ private let optionsEnumNameArgumentLabel = "optionsName"
|
||||
/// eventually be overridable.
|
||||
private let defaultOptionsEnumName = "Options"
|
||||
|
||||
extension LabeledExprListSyntax {
|
||||
/// Retrieve the first element with the given label.
|
||||
func first(labeled name: String) -> Element? {
|
||||
return first { element in
|
||||
if let label = element.label, label.text == name {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct OptionSetMacro {
|
||||
/// Decodes the arguments to the macro expansion.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user