MemberMacro
Describes a macro that can add members to the declaration it’s attached to.
protocol MemberMacro : AttachedMacro
Browse conforming typesDescribes a macro that can add members to the declaration it’s attached to.
protocol MemberMacro : AttachedMacro
import SwiftSyntaxMacros
protocol AttachedMacro : Macro
Describes a macro that is attached, meaning that it is used with custom attribute syntax and attached to another entity.
protocol Macro
Describes a macro.
static func expansion(of node: AttributeSyntax, providingMembersOf declaration: some DeclGroupSyntax, conformingTo protocols: [TypeSyntax], in context: some MacroExpansionContext) throws -> [DeclSyntax]
Expand an attached declaration macro to produce a set of members.
static func expansion(of node: AttributeSyntax, providingMembersOf declaration: some DeclGroupSyntax, in context: some MacroExpansionContext) throws -> [DeclSyntax]
Expand an attached declaration macro to produce a set of members.
static func expansion(of node: AttributeSyntax, providingMembersOf declaration: some DeclGroupSyntax, conformingTo protocols: [TypeSyntax], in context: some MacroExpansionContext) throws -> [DeclSyntax]
Default implementation that ignores the unhandled conformances.
static func expansion(of node: AttributeSyntax, providingMembersOf declaration: some DeclGroupSyntax, in context: some MacroExpansionContext) throws -> [DeclSyntax]
Default implementation supplies no conformances.