ForLoopNode

class ForLoopNode(initialize: SimpleStatementNode, guard: ExpressionNode, update: SimpleStatementNode, body: BlockNode, jumpLabel: JumpLabelNode?, sourceLocation: SourceLocation, comment: String?) : LoopNode

A for loop.

Parameters

initialize

Initializer for loop variables.

guard

Loop until this becomes false.

update

Update loop variables after each iteration.

Constructors

ForLoopNode
Link copied to clipboard
fun ForLoopNode(initialize: SimpleStatementNode, guard: ExpressionNode, update: SimpleStatementNode, body: BlockNode, jumpLabel: JumpLabelNode?, sourceLocation: SourceLocation, comment: String? = null)

Functions

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

Properties

body
Link copied to clipboard
open override val body: BlockNode

Statements to execute repeatedly.

comment
Link copied to clipboard
open override val comment: String? = null
guard
Link copied to clipboard
val guard: ExpressionNode
initialize
Link copied to clipboard
val initialize: SimpleStatementNode
jumpLabel
Link copied to clipboard
open override val jumpLabel: JumpLabelNode?

A label for the loop that break nodes can refer to.

sourceLocation
Link copied to clipboard
open override val sourceLocation: SourceLocation
update
Link copied to clipboard
val update: SimpleStatementNode