DeclarationKind

These are the kinds of arguments, variables, constants, and labels that can be declared. There are also optional initializing expressions, fixed values (for module constants), and fixed variable objects (for module variables).

Author

Mark van Gulik

Entries

Link copied to clipboard

An argument to a block.

Link copied to clipboard

A label declaration at the start of a block.

Link copied to clipboard

A local variable, declared within a block.

Link copied to clipboard

A local constant, declared within a block.

Link copied to clipboard

A variable declared at the outermost (module) scope.

Link copied to clipboard

A constant declared at the outermost (module) scope.

Link copied to clipboard

A local constant, declared within a block.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val fieldName: String

Answer the name of this enumeration value.

Link copied to clipboard
open override val fieldOrdinal: Int

Answer an integer that identifies this enumeration value uniquely within this enumeration subclass (i.e., any enumeration class implementing this interface). These values are allocated sequentially to the enumeration values, starting at zero.

Link copied to clipboard

Whether this entity occurs at the module scope.

Link copied to clipboard

Whether this entity can be modified.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun emitEffectForOn(tokens: A_Tuple, declarationNode: A_Phrase, codeGenerator: AvailCodeGenerator)

If this is an ordinary declaration then it was handled on a separate pass. Do nothing by default.

Link copied to clipboard
open fun emitVariableAssignmentForOn(tokens: A_Tuple, declarationNode: A_Phrase, codeGenerator: AvailCodeGenerator)

Emit an assignment to this variable.

Link copied to clipboard
open fun emitVariableReferenceForOn(tokens: A_Tuple, declarationNode: A_Phrase, codeGenerator: AvailCodeGenerator)

Emit a reference to this variable.

Link copied to clipboard
open fun emitVariableValueForOn(tokens: A_Tuple, declarationNode: A_Phrase, codeGenerator: AvailCodeGenerator)

Emit a use of this variable.

Link copied to clipboard

Return an Avail string describing this kind of declaration.

Link copied to clipboard

Answer a Java String describing this kind of declaration.

Link copied to clipboard

Return the instance of the enumeration PhraseKind that is associated with this kind of declaration.

Link copied to clipboard
abstract fun print(self: A_Phrase, builder: StringBuilder, recursionMap: IdentityHashMap<A_BasicObject, Void>, indent: Int)

Print a declaration of this kind.

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.