ConditionalStmt
public struct ConditionalStmt : Stmt, LexicalScope
A conditional statement.
Unlike a ConditionalExpr, the branches of a conditional statement are represented by brace
statements. Further, a conditional statement might not have a failure branch.
-
Declaration
Swift
public let site: SourceRange -
The site of the
ifintroducer.Declaration
Swift
public let introducerSite: SourceRange -
The condition of the expression.
Requires
condition.count > 0Declaration
Swift
public let condition: [ConditionItem] -
The branch that’s executed if the condition holds.
Declaration
Swift
public let success: BraceStmt.ID -
The branch that’s executed if the condition does not hold.
Declaration
Swift
public let failure: Introduced<AnyStmtID>? -
Undocumented
Declaration
Swift
public init( introducerSite: SourceRange, condition: [ConditionItem], success: BraceStmt.ID, failure: Introduced<AnyStmtID>?, site: SourceRange )
View on GitHub