VariableDeclaration

class VariableDeclaration(    val identifier: Identifier,     val type: Type,     val expression: Expression,     val isConst: Boolean) : Statement

Declares an initialises a variable or constant in the current scope.

Constructors

Link copied to clipboard
fun VariableDeclaration(    identifier: Identifier,     type: Type,     expression: Expression,     isConst: Boolean)

Properties

Link copied to clipboard
val expression: Expression

an expression evaluating to the initial value for this variable.

Link copied to clipboard
val identifier: Identifier

the identifier that will be used to access this variable.

Link copied to clipboard
val isConst: Boolean

whether this is a constant. Constants are immutable, but are not required to be compile-time constants.

Link copied to clipboard
val type: Type

the type of this variable.