Enumeration
ConditionalCompilationBlock.Branch
public enum Branch
A conditional compilation block branch.
Relationships
Member Of
ConditionalCompilationBlock
A conditional compilation block declaration.
Conforms To
ExpressibleBySyntax
A type that can be initialized with a Swift syntax node.
Codable
Hashable
Enumeration Cases
`if`
case `if`(: String)
An #if
branch.
`elseif`
case `elseif`(: String)
An #elseif
branch.
`else`
case `else`
An #else
branch.
Initializers
init(_:)
public init(_ node: IfConfigClauseSyntax)
Creates an instance initialized with the given syntax node.
init(from:)
public init(from decoder: Decoder) throws
Properties
keyword
var keyword: String
The branch keyword, either "#if"
, "#elseif"
, or "#else"
.
condition
var condition: String?
The branch condition, if any.
This value is present when keyword
is equal to "#if"
or #elseif
and nil
when keyword
is equal to "#else"
.
Methods
encode(to:)
public func encode(to encoder: Encoder) throws