newVariable

fun newVariable(token: A_Token, declaredType: A_Type, typeExpression: A_Phrase, initializationExpression: A_Phrase): A_Phrase

Construct a new declaration of a DeclarationKind.LOCAL_VARIABLE.

Return

The new local variable declaration.

Parameters

token

The token that is the defining occurrence of the name of the local variable being declared.

declaredType

The inner type of the local variable being declared.

typeExpression

The expression that produced the type for the entity being declared, or nil if there was no such expression.

initializationExpression

An expression used for initializing the local variable, or nil if none.