Skip to content

Commit 18d80cf

Browse files
committed
improve Swift 6 support
1 parent 4ba0e04 commit 18d80cf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

macros/Generators/StructSchemaGenerator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ extension StructSchemaGenerator {
7070
guard let type = patternBinding.typeAnnotation?.type else {
7171
context.diagnose(.init(
7272
node: variableDecl,
73-
message: MacroExpansionErrorMessage("You must provide a type for the property '\(identifier.text)'."),
73+
message: MacroExpansionErrorMessage("You must provide a type for the property '\(identifier.text)'.")
7474
))
7575
return nil
7676
}

macros/Macros/ToolMacro.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public struct ToolMacro: ExtensionMacro {
2929
if parameter.firstName.text != "_", !parameter.firstName.text.isPlaceholder, functionDocString?.for(properties: parameter.firstName.text, parameter.secondName?.text) == nil {
3030
context.diagnose(Diagnostic(
3131
node: declaration,
32-
message: MacroExpansionWarningMessage("You should document the `\(parameter.firstName.text)` parameter to help the model understand its usage."),
32+
message: MacroExpansionWarningMessage("You should document the `\(parameter.firstName.text)` parameter to help the model understand its usage.")
3333
))
3434
}
3535
}
@@ -40,7 +40,7 @@ public struct ToolMacro: ExtensionMacro {
4040
extendedType: type,
4141
inheritanceClause: InheritanceClauseSyntax { InheritedTypeSyntax(
4242
type: IdentifierTypeSyntax(name: "Toolable")
43-
) },
43+
) }
4444
) {
4545
try MemberBlockItemListSyntax {
4646
try addTypes(reading: functionDecl)

0 commit comments

Comments
 (0)