Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

ConditionalCompilationBlock_Branch

mattt edited this page Feb 7, 2020 · 9 revisions

ConditionalCompilationBlock.Branch

A conditional compilation block branch.

public enum Branch

Inheritance

Hashable

Enumeration Cases

else

An #else branch.

case else

elseif

An #elseif branch.

case elseif(: String)

if

An #if branch.

case if(: String)

Initializers

init(from:)

public init(from decoder: Decoder) throws

init?(keyword:condition:)

init?(keyword: String, condition: String?)

init(_:)

Creates an instance initialized with the given syntax node.

public init(_ node: IfConfigDeclSyntax)

init(_:)

Creates an instance initialized with the given syntax node.

public init(_ node: IfConfigClauseSyntax)

Properties

condition

The branch condition, if any.

var condition: String?

This value is present when keyword is equal to "#if" or #elseif and nil when keyword is equal to "#else".

keyword

The branch keyword, either "#if", "#elseif", or "#else".

var keyword: String

Methods

encode(to:)

public func encode(to encoder: Encoder) throws

Clone this wiki locally