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
PRIMITIVE_FAILURE_REASON("primitive failure reason", true, false, PhraseKind.PRIMITIVE_FAILURE_REASON_PHRASE)

A local constant, declared within a block.

Link copied to clipboard
MODULE_CONSTANT("module constant", false, true, PhraseKind.MODULE_CONSTANT_PHRASE)

A constant declared at the outermost (module) scope.

Link copied to clipboard
MODULE_VARIABLE("module variable", true, true, PhraseKind.MODULE_VARIABLE_PHRASE)

A variable declared at the outermost (module) scope.

Link copied to clipboard
LOCAL_CONSTANT("local constant", false, false, PhraseKind.LOCAL_CONSTANT_PHRASE)

A local constant, declared within a block.

Link copied to clipboard
LOCAL_VARIABLE("local variable", true, false, PhraseKind.LOCAL_VARIABLE_PHRASE)

A local variable, declared within a block.

Link copied to clipboard
LABEL("label", false, false, PhraseKind.LABEL_PHRASE)

A label declaration at the start of a block.

Link copied to clipboard
ARGUMENT("argument", false, false, PhraseKind.ARGUMENT_PHRASE)

An argument to a block.

Types

Link copied to clipboard
object Companion

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
fun kindName(): A_String

Return an Avail string describing this kind of declaration.

Link copied to clipboard
fun nativeKindName(): String

Answer a Java String describing this kind of declaration.

Link copied to clipboard
fun phraseKind(): PhraseTypeDescriptor.PhraseKind

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.

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
val isModuleScoped: Boolean

Whether this entity occurs at the module scope.

Link copied to clipboard
val isVariable: Boolean

Whether this entity can be modified.

Link copied to clipboard
val name: String
Link copied to clipboard
val ordinal: Int