SwiftSemantics Documentation Beta

Enumeration Conditional​Compilation​Block.​Branch

public enum Branch

A conditional compilation block branch.

%3 ConditionalCompilationBlock.Branch ConditionalCompilationBlock.Branch ExpressibleBySyntax ExpressibleBySyntax ConditionalCompilationBlock.Branch->ExpressibleBySyntax Codable Codable ConditionalCompilationBlock.Branch->Codable Hashable Hashable ConditionalCompilationBlock.Branch->Hashable

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