Skip to content

Commit e95026e

Browse files
authored
Merge pull request #3084 from bnbarham/add-sendable-metatype
Add a `SendableMetatype` conformance to `Macro`
2 parents 29fd4cc + 0efe931 commit e95026e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Sources/SwiftSyntaxMacros/MacroProtocols/Macro.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,18 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#if compiler(>=6.2)
14+
/// Describes a macro.
15+
public protocol Macro: SendableMetatype {
16+
/// How the resulting expansion should be formatted, `.auto` by default.
17+
/// Use `.disabled` for the expansion to be used as is.
18+
static var formatMode: FormatMode { get }
19+
}
20+
#else
1321
/// Describes a macro.
1422
public protocol Macro {
1523
/// How the resulting expansion should be formatted, `.auto` by default.
1624
/// Use `.disabled` for the expansion to be used as is.
1725
static var formatMode: FormatMode { get }
1826
}
27+
#endif

0 commit comments

Comments
 (0)