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

ConditionalCompilationBlock_Branch

Mattt edited this page Aug 2, 2020 · 9 revisions

ConditionalCompilationBlock.Branch

A conditional compilation block branch.

public enum Branch

Inheritance

Codable, ExpressibleBySyntax, Hashable

Initializers

init(_:​)

Creates an instance initialized with the given syntax node.

public init(_ node:​ IfConfigClauseSyntax)

init(from:​)

public init(from decoder:​ Decoder) throws

Enumeration Cases

`if`

An #if branch.

case `if`(:​ String)

`elseif`

An #elseif branch.

case `elseif`(:​ String)

`else`

An #else branch.

case `else`

Properties

keyword

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

var keyword:​ String

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".

Methods

encode(to:​)

public func encode(to encoder:​ Encoder) throws
Clone this wiki locally