ExpressionMacro
Describes a macro that is explicitly expanded as an expression.
protocol ExpressionMacro : FreestandingMacro
Browse conforming typesDescribes a macro that is explicitly expanded as an expression.
protocol ExpressionMacro : FreestandingMacro
import SwiftSyntaxMacros
protocol FreestandingMacro : Macro
Describes a macro that is freestanding, meaning that it is used with the #
syntax.
protocol Macro
Describes a macro.
static func expansion(of node: some FreestandingMacroExpansionSyntax, in context: some MacroExpansionContext) throws -> ExprSyntax
Expand a macro described by the given freestanding macro expansion within the given context to produce a replacement expression.
import TestingMacros
protocol ConditionMacro : Sendable, ExpressionMacro
A protocol containing the common implementation for the expansions of the #expect()
and #require()
macros.
protocol ExitTestConditionMacro : RefinedConditionMacro
protocol RefinedConditionMacro : ConditionMacro
A protocol that can be used to create a condition macro that refines the behavior of another previously-defined condition macro.