PhraseKind

My hierarchy of kinds of phrases.

Parameters

jsonName

The JSON name of this type.

parentKind

The kind of phrase for which this is a subkind.

typeTag

The type tag associated with phrases of this kind.

Entries

Link copied to clipboard
MACRO_SUBSTITUTION_PHRASE("macro substitution phrase type", PARSE_PHRASE, TypeTag.UNKNOWN_TAG)

The result of a macro substitution.

Link copied to clipboard
EXPRESSION_AS_STATEMENT_PHRASE("expression as statement phrase type", STATEMENT_PHRASE, TypeTag.EXPRESSION_AS_STATEMENT_PHRASE_TAG)

A statement phrase built from an expression. At the moment, only assignments and sends can be expression-as-statement phrases.

Link copied to clipboard
PRIMITIVE_FAILURE_REASON_PHRASE("primitive failure reason phrase type", DECLARATION_PHRASE, TypeTag.PRIMITIVE_FAILURE_REASON_PHRASE_TAG)

The kind of a primitive failure reason variable declaration.

Link copied to clipboard
MODULE_CONSTANT_PHRASE("module constant phrase type", DECLARATION_PHRASE, TypeTag.MODULE_CONSTANT_PHRASE_TAG)

The kind of a module constant declaration phrase.

Link copied to clipboard
MODULE_VARIABLE_PHRASE("module variable phrase type", DECLARATION_PHRASE, TypeTag.MODULE_VARIABLE_PHRASE_TAG)

The kind of a module variable declaration phrase.

Link copied to clipboard
LOCAL_CONSTANT_PHRASE("local constant phrase type", DECLARATION_PHRASE, TypeTag.LOCAL_CONSTANT_PHRASE_TAG)

The kind of a local constant declaration phrase.

Link copied to clipboard
LOCAL_VARIABLE_PHRASE("local variable phrase type", DECLARATION_PHRASE, TypeTag.LOCAL_VARIABLE_PHRASE_TAG)

The kind of a local variable declaration phrase.

Link copied to clipboard
LABEL_PHRASE("label phrase type", DECLARATION_PHRASE, TypeTag.LABEL_PHRASE_TAG)

The kind of a label declaration phrase.

Link copied to clipboard
ARGUMENT_PHRASE("argument phrase type", DECLARATION_PHRASE, TypeTag.ARGUMENT_PHRASE_TAG)

The kind of an argument declaration phrase.

Link copied to clipboard
DECLARATION_PHRASE("declaration phrase type", STATEMENT_PHRASE, TypeTag.DECLARATION_PHRASE_TAG)

The kind of a declaration phrase.

Link copied to clipboard
FIRST_OF_SEQUENCE_PHRASE("first-of-sequence phrase type", STATEMENT_PHRASE, TypeTag.FIRST_OF_SEQUENCE_PHRASE_TAG)
Link copied to clipboard
SEQUENCE_PHRASE("sequence phrase type", STATEMENT_PHRASE, TypeTag.SEQUENCE_PHRASE_TAG)

The kind of a sequence phrase.

Link copied to clipboard
STATEMENT_PHRASE("statement phrase type", PARSE_PHRASE, TypeTag.STATEMENT_PHRASE_TAG)

A phrase that does not produce a result.

Link copied to clipboard
SEQUENCE_AS_EXPRESSION_PHRASE("sequence as expression phrase type", EXPRESSION_PHRASE, TypeTag.SEQUENCE_AS_EXPRESSION_PHRASE_TAG)

The kind of a sequence-as-expression.

Link copied to clipboard
VARIABLE_USE_PHRASE("variable use phrase type", EXPRESSION_PHRASE, TypeTag.VARIABLE_USE_PHRASE_TAG)

The kind of a variable use phrase.

Link copied to clipboard
PERMUTED_LIST_PHRASE("permuted list phrase type", LIST_PHRASE, TypeTag.PERMUTED_LIST_PHRASE_TAG)

The kind of a permuted list phrase.

Link copied to clipboard
LIST_PHRASE("list phrase type", EXPRESSION_PHRASE, TypeTag.LIST_PHRASE_TAG)

The kind of a list phrase.

Link copied to clipboard
SEND_PHRASE("send phrase type", EXPRESSION_PHRASE, TypeTag.SEND_PHRASE_TAG)

The kind of a send phrase.

Link copied to clipboard
SUPER_CAST_PHRASE("super cast phrase", EXPRESSION_PHRASE, TypeTag.SUPER_CAST_PHRASE_TAG)

The kind of a super cast phrase.

Link copied to clipboard
REFERENCE_PHRASE("variable reference phrase type", EXPRESSION_PHRASE, TypeTag.REFERENCE_PHRASE_TAG)

The kind of a reference phrase.

Link copied to clipboard
LITERAL_PHRASE("literal phrase type", EXPRESSION_PHRASE, TypeTag.LITERAL_PHRASE_TAG)

The kind of a literal phrase.

Link copied to clipboard
BLOCK_PHRASE("block phrase type", EXPRESSION_PHRASE, TypeTag.BLOCK_PHRASE_TAG)

The kind of a block phrase.

Link copied to clipboard
ASSIGNMENT_PHRASE("assignment phrase type", EXPRESSION_PHRASE, TypeTag.ASSIGNMENT_PHRASE_TAG)

The kind of an assignment phrase.

Link copied to clipboard
MARKER_PHRASE("marker phrase type", EXPRESSION_PHRASE, TypeTag.MARKER_PHRASE_TAG)

The kind of a parse marker.

Link copied to clipboard
EXPRESSION_PHRASE("expression phrase type", PARSE_PHRASE, TypeTag.EXPRESSION_PHRASE_TAG)

The abstract parent kind of all expression phrases.

Link copied to clipboard
PARSE_PHRASE("phrase type", null, TypeTag.PHRASE_TAG)

The root phrase kind.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Answer the PhraseKind that is the nearest common ancestor to both the receiver and the argument. Only use this after static initialization has completed.

Link copied to clipboard

Answer the PhraseKind that is the nearest common descendant to both the receiver and the argument. Only use this after static initialization has completed.

Link copied to clipboard
fun create(yieldType: A_Type): A_Type

Create a phrase type given the yield type (the type of object produced by the expression).

Link copied to clipboard
open fun createDescriptor(mutability: Mutability): PhraseTypeDescriptor

Create a descriptor for this kind.

Link copied to clipboard
open fun createNoCheck(yieldType: A_Type): A_Type

Create a phrase type given the yield type (the type of object produced by the expression).

Link copied to clipboard
fun isSubkindOf(purportedParent: PhraseTypeDescriptor.PhraseKind): Boolean

Answer whether this is a subkind of (or equal to) the specified PhraseKind.

Link copied to clipboard
fun parentKind(): PhraseTypeDescriptor.PhraseKind?

Answer the kind of phrase of which this object is the type.

Properties

Link copied to clipboard
var depth: Int = 0

The depth of this object in the PhraseKind hierarchy.

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 immutableDescriptor: PhraseTypeDescriptor

The descriptor for mutable instances of this kind.

Link copied to clipboard
val jsonName: String

The JSON name of this type.

Link copied to clipboard
val mostGeneralType: A_Type

Answer a phrase type whose kind is the receiver and whose expression type is top. This is the most general phrase type of that kind.

Link copied to clipboard
val mostGeneralYieldType: A_Type

The most general inner type for this kind of phrase. Computed lazily via the overrideable produceMostGeneralYieldType.

Link copied to clipboard
val mutableDescriptor: PhraseTypeDescriptor

The descriptor for mutable instances of this kind.

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

The descriptor for shared instances of this kind.

Link copied to clipboard
val typeTag: TypeTag

The type tag associated with phrases of this kind.