[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:
Holly Borla
2025-03-20 09:29:21 -07:00
parent be670da373
commit bac0a10ae2
9 changed files with 318 additions and 207 deletions

View File

@@ -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.
///