IfNode

class IfNode(guard: ExpressionNode, thenBranch: BlockNode, elseBranch: BlockNode, sourceLocation: SourceLocation, comment: String?) : StatementNode

Executing statements conditionally.

Parameters

thenBranch

Statement to execute if the guard is true.

elseBranch

Statement to execute if the guard is false.

Constructors

IfNode
Link copied to clipboard
fun IfNode(guard: ExpressionNode, thenBranch: BlockNode, elseBranch: BlockNode, sourceLocation: SourceLocation, comment: String? = null)

Functions

toDocument
Link copied to clipboard
override fun toDocument(): Document

Properties

comment
Link copied to clipboard
open override val comment: String? = null
elseBranch
Link copied to clipboard
val elseBranch: BlockNode
guard
Link copied to clipboard
val guard: ExpressionNode
sourceLocation
Link copied to clipboard
open override val sourceLocation: SourceLocation
thenBranch
Link copied to clipboard
val thenBranch: BlockNode