A_Phrase

interface A_Phrase : A_BasicObject

An A_Phrase is generally produced when the AvailCompiler parses source code of an A_Module. Avail defines a variety of phrases, which are implemented by the subclasses of PhraseDescriptor. A_Phrase is a sub-interface of A_BasicObject, and defines the operations that phrases implement.

Author

Mark van Gulik

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun becomeIndirectionTo(anotherObject: A_BasicObject)

Turn the receiver into an indirection to the specified object.

Link copied to clipboard
abstract fun declarationKind(): DeclarationPhraseDescriptor.DeclarationKind
Link copied to clipboard
abstract fun describeForDebugger(): Array<AvailObjectFieldHelper>

Utility method for decomposing this object in the debugger.

Link copied to clipboard
abstract fun descriptor(): AbstractDescriptor

Retrieve the object's {@linkplain AbstractDescriptor descriptor}.

Link copied to clipboard
abstract fun enumerationIncludesInstance(potentialInstance: AvailObject): Boolean
Link copied to clipboard
abstract fun equals(another: A_BasicObject): Boolean

Answer whether the receiver and the argument, both A_BasicObjects, are equal in value.

abstract operator override fun equals(other: Any?): Boolean

{@inheritDoc}

Link copied to clipboard
abstract fun equalsAnyTuple(aTuple: A_Tuple): Boolean

Answer whether the receiver, an object, and the argument, a tuple, are equal in value.

Link copied to clipboard
abstract fun equalsByteArrayTuple(aByteArrayTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsByteBufferTuple(aByteBufferTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsByteString(aByteString: A_String): Boolean

Answer whether the receiver, an object, and the argument, a byte string, are equal in value.

Link copied to clipboard
abstract fun equalsByteTuple(aByteTuple: A_Tuple): Boolean

Answer whether the receiver, an object, and the argument, a byte tuple, are equal in value.

Link copied to clipboard
abstract fun equalsCompiledCode(aCompiledCode: A_RawFunction): Boolean

Answer whether the arguments, an object and a compiled code, are equal.

Link copied to clipboard
abstract fun equalsCompiledCodeType(aCompiledCodeType: A_Type): Boolean
Link copied to clipboard
abstract fun equalsContinuation(aContinuation: A_Continuation): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
abstract fun equalsContinuationType(aContinuationType: A_Type): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
abstract fun equalsEnumerationType(anEnumerationType: A_BasicObject): Boolean
Link copied to clipboard
abstract fun equalsEnumerationWithSet(aSet: A_Set): Boolean

Determine whether the receiver is an enumeration with the given set of instances.

Link copied to clipboard
abstract fun equalsEqualityRawPojoFor(otherEqualityRawPojo: AvailObject, otherJavaObject: Any?): Boolean
Link copied to clipboard
abstract fun equalsFiberType(aFiberType: A_Type): Boolean

Answer whether the receiver, an object, and the argument, a fiber type, are equal in value.

Link copied to clipboard
abstract fun equalsFunction(aFunction: A_Function): Boolean

Answer whether the receiver, an object, and the argument, a function, are equal in value.

Link copied to clipboard
abstract fun equalsFunctionType(aFunctionType: A_Type): Boolean

Answer whether the receiver, an object, and the argument, a function type, are equal.

Link copied to clipboard
abstract fun equalsInstanceTypeFor(anInstanceType: AvailObject): Boolean
Link copied to clipboard
abstract fun equalsIntegerIntervalTuple(anIntegerIntervalTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsIntegerRangeType(anIntegerRangeType: A_Type): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
abstract fun equalsIntTuple(anIntTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsListNodeType(listNodeType: A_Type): Boolean

Answer whether this value equals the given list phrase type.

Link copied to clipboard
abstract fun equalsLiteralTokenType(aLiteralTokenType: A_Type): Boolean
Link copied to clipboard
abstract fun equalsLongTuple(aLongTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsMap(aMap: A_Map): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
abstract fun equalsMapType(aMapType: A_Type): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
abstract fun equalsNybbleTuple(aNybbleTuple: A_Tuple): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsObject(anObject: AvailObject): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsObjectTuple(anObjectTuple: A_Tuple): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsObjectType(anObjectType: AvailObject): Boolean
Link copied to clipboard
abstract fun equalsPhrase(aPhrase: A_Phrase): Boolean
Link copied to clipboard
abstract fun equalsPhraseType(aPhraseType: A_Type): Boolean
Link copied to clipboard
abstract fun equalsPojo(aPojo: AvailObject): Boolean
Link copied to clipboard
abstract fun equalsPojoBottomType(): Boolean
Link copied to clipboard
abstract fun equalsPojoField(field: AvailObject, receiver: AvailObject): Boolean
Link copied to clipboard
abstract fun equalsPojoType(aPojoType: AvailObject): Boolean
Link copied to clipboard
abstract fun equalsPrimitiveType(aPrimitiveType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsRawPojoFor(otherRawPojo: AvailObject, otherJavaObject: Any?): Boolean
Link copied to clipboard
abstract fun equalsRepeatedElementTuple(aRepeatedElementTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsReverseTuple(aTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsSetType(aSetType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsSmallIntegerIntervalTuple(aSmallIntegerIntervalTuple: A_Tuple): Boolean
Link copied to clipboard
abstract fun equalsToken(aToken: A_Token): Boolean
Link copied to clipboard
abstract fun equalsTokenType(aTokenType: A_Type): Boolean
Link copied to clipboard
abstract fun equalsTupleType(aTupleType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsTwoByteString(aTwoByteString: A_String): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun equalsVariableType(aVariableType: A_Type): Boolean

Answer whether the receiver equals the argument.

Link copied to clipboard
abstract fun fieldAt(field: A_Atom): AvailObject

Extract a field from an object.

Link copied to clipboard
abstract fun fieldAtIndex(index: Int): AvailObject

Extract a field from an object, using a one-based index into the field slots. This requires knowledge of the ObjectLayoutVariant, since the same field is at different indices in different variants.

Link copied to clipboard
abstract fun fieldAtOrNull(field: A_Atom): AvailObject?

Extract a field from an object, or answer null if it's not present.

Link copied to clipboard
abstract fun fieldAtPuttingCanDestroy(    field: A_Atom,     value: A_BasicObject,     canDestroy: Boolean): A_BasicObject

Add or replace a field of an object.

Link copied to clipboard
abstract fun fieldMap(): A_Map

Dispatch to the descriptor.

Link copied to clipboard
abstract fun fieldTuple(): A_Tuple
Link copied to clipboard
abstract fun fieldTypeAt(field: A_Atom): A_Type

Extract a field type from an object type.

Link copied to clipboard
abstract fun fieldTypeAtIndex(index: Int): A_Type

Extract a field type from an object type, using the given field index, which is specific to an ObjectLayoutVariant.

Link copied to clipboard
abstract fun fieldTypeAtOrNull(field: A_Atom): A_Type?

Extract a field type from an object type, or null if it's not present.

Link copied to clipboard
abstract fun hash(): Int

Compute the 32-bit hash of the receiver.

Link copied to clipboard
abstract override fun hashCode(): Int
Link copied to clipboard
abstract fun hashOrZero(): Int

Dispatch to the descriptor.

Link copied to clipboard
open fun <T : A_BasicObject> ifNotNil(action: (T) -> Unit)

If the receiver is notNil, evaluate the action with it.

Link copied to clipboard
abstract fun integerSlotsCount(): Int

Answer the number of integer slots. All variable integer slots occur following the last fixed integer slot.

Link copied to clipboard
abstract fun isInstanceOf(aType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun isInstanceOfKind(aType: A_Type): Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract fun javaAncestors(): AvailObject
Link copied to clipboard
abstract fun javaClass(): A_BasicObject
Link copied to clipboard
abstract fun <T : Any> javaObject(): T?
Link copied to clipboard
abstract fun <T : Any> javaObjectNotNull(): T
Link copied to clipboard
abstract fun kind(): A_Type

Dispatch to the descriptor.

Link copied to clipboard
abstract fun <T> lock(body: () -> T): T

Lock the fiber during evaluation of the Supplier, and return the produced value.

Link copied to clipboard
abstract fun makeImmutable(): AvailObject

Dispatch to the descriptor.

Link copied to clipboard
abstract fun makeImmutableInternal(queueToProcess: MutableList<AvailObject>, fixups: MutableList<() -> Unit>)

The receiver is marked with an IMMUTABLE descriptor, but its subobjects have not yet been made immutable. Scan them now, and do any additional fix-ups necessary for the kind of object.

Link copied to clipboard
abstract fun makeShared(): AvailObject

Dispatch to the descriptor.

Link copied to clipboard
abstract fun makeSharedInternal(queueToProcess: MutableList<AvailObject>, fixups: MutableList<() -> Unit>)

The receiver is marked with a SHARED descriptor, but its subobjects have not yet been made shared. Scan them now, and do any additional fix-ups necessary for the kind of object.

Link copied to clipboard
abstract fun makeSubobjectsImmutable(): AvailObject

Dispatch to the descriptor.

Link copied to clipboard
abstract fun makeSubobjectsShared(): AvailObject

Dispatch to the descriptor.

Link copied to clipboard
open fun <T : A_BasicObject, O : A_BasicObject> mapNotNil(action: (T) -> O): O

If the receiver is notNil, evaluate the action with it.

Link copied to clipboard
abstract fun marshalToJava(classHint: Class<*>?): Any?
Link copied to clipboard
abstract fun nameForDebugger(): String

Answer a name suitable for labeling a field containing this object.

Link copied to clipboard
abstract fun objectSlotsCount(): Int

Answer the number of object slots in this AvailObject. All variable object slots occur following the last fixed object slot.

Link copied to clipboard
abstract fun pojoSelfType(): A_Type
Link copied to clipboard
abstract fun printOnAvoidingIndent(    builder: StringBuilder,     recursionMap: IdentityHashMap<A_BasicObject, Void>,     indent: Int)

Recursively print the receiver to the builder unless it is already present in the recursionMap. Printing will begin at the specified indent level, measured in horizontal tab characters.

Link copied to clipboard
abstract fun rawPojo(): AvailObject
Link copied to clipboard
abstract fun representationCostOfTupleType(): Int

Dispatch to the descriptor.

Link copied to clipboard
abstract fun resultType(): A_Type
Link copied to clipboard
abstract fun sameAddressAs(anotherObject: A_BasicObject): Boolean

Answer whether the objects occupy the same memory addresses.

Link copied to clipboard
abstract fun scanSubobjects(visitor: (AvailObject) -> AvailObject)

Dispatch to the descriptor.

Link copied to clipboard
abstract fun serializerOperation(): SerializerOperation
Link copied to clipboard
abstract fun setDescriptor(newDescriptor: AbstractDescriptor)

Replace the object's {@linkplain AbstractDescriptor descriptor}.

Link copied to clipboard
abstract fun setHashOrZero(value: Int)

Dispatch to the descriptor.

Link copied to clipboard
abstract fun setToInvalidDescriptor()

Replace my descriptor field with a FillerDescriptor. This blows up for most messages, catching incorrect (all, by definition) further accidental uses of this object.

Link copied to clipboard
abstract fun showValueInNameForDebugger(): Boolean

Answer whether to show value-specific content in the file name for the debugger.

Link copied to clipboard
abstract fun traversed(): AvailObject

Follow indirections until a non-indirection is reached. Replace each indirection's target with the ultimate target.

Link copied to clipboard
abstract fun traversedWhileMakingImmutable(): AvailObject

Follow indirections until a non-indirection is reached. Replace each indirection's target with the ultimate target, even if it would cause the otherwise-forbidden immutable->mutable references. Only used during makeImmutable.

Link copied to clipboard
abstract fun traversedWhileMakingShared(): AvailObject

Follow indirections until a non-indirection is reached. Replace each indirection's target with the ultimate target, even if it would cause the otherwise-forbidden shared->unshared references. Only used during makeShared.

Link copied to clipboard
abstract fun variableIntegerSlotsCount(): Int

Answer the number of variable integer slots in this object. This does not include the fixed integer slots.

Link copied to clipboard
abstract fun variableObjectSlotsCount(): Int

Answer the number of variable object slots in this AvailObject. This does not include the fixed object slots.

Link copied to clipboard
abstract fun writeSummaryTo(writer: JSONWriter)
Link copied to clipboard
abstract fun writeTo(writer: JSONWriter)

Properties

Link copied to clipboard
abstract val isAbstract: Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract val isAtom: Boolean

Is the receiver an Avail atom?

Link copied to clipboard
abstract val isBoolean: Boolean

Is the receiver an Avail boolean?

Link copied to clipboard
abstract val isByteArrayTuple: Boolean
Link copied to clipboard
abstract val isByteBufferTuple: Boolean
Link copied to clipboard
abstract val isByteString: Boolean

Is the receiver an Avail byte string?

Link copied to clipboard
abstract val isByteTuple: Boolean

Is the receiver an Avail byte tuple?

Link copied to clipboard
abstract val isExtendedInteger: Boolean

Is the receiver an Avail extended integer?

Link copied to clipboard
abstract val isFinite: Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract val isFunction: Boolean

Is the receiver an Avail function?

Link copied to clipboard
abstract val isInitializedWriteOnceVariable: Boolean
Link copied to clipboard
abstract val isInstanceMeta: Boolean
Link copied to clipboard
abstract val isIntegerIntervalTuple: Boolean
Link copied to clipboard
abstract val isIntegerRangeType: Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract val isIntTuple: Boolean

Is the receiver an Avail IntTupleDescriptor? This is conservative, in that some object tuples may only contain ints but not be reported as being int tuples.

Link copied to clipboard
abstract val isLiteralTokenType: Boolean
Link copied to clipboard
abstract val isLongTuple: Boolean

Is the receiver an Avail LongTupleDescriptor? This is conservative, in that some object tuples may only contain longs but not be reported as being long tuples.

Link copied to clipboard
abstract val isMap: Boolean

Is the receiver an Avail map?

Link copied to clipboard
abstract val isMapType: Boolean

Dispatch to the descriptor.

Link copied to clipboard
open val isNil: Boolean

Test if the receiver is the nil value.

Link copied to clipboard
abstract val isNybble: Boolean

Is the receiver an Avail nybble?

Link copied to clipboard
abstract val isPojo: Boolean
Link copied to clipboard
abstract val isPojoArrayType: Boolean
Link copied to clipboard
abstract val isPojoFusedType: Boolean
Link copied to clipboard
abstract val isPojoSelfType: Boolean
Link copied to clipboard
abstract val isPojoType: Boolean
Link copied to clipboard
abstract val isRawPojo: Boolean
Link copied to clipboard
abstract val isRepeatedElementTuple: Boolean
Link copied to clipboard
abstract val isSetType: Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract val isSmallIntegerIntervalTuple: Boolean
Link copied to clipboard
abstract val isString: Boolean

Is the receiver an Avail string?

Link copied to clipboard
abstract val isTokenType: Boolean
Link copied to clipboard
abstract val isTuple: Boolean

Is the receiver an Avail tuple?

Link copied to clipboard
abstract val isTupleType: Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract val isTwoByteString: Boolean

Is the receiver an Avail two-byte string?

Link copied to clipboard
abstract val isType: Boolean

Dispatch to the descriptor.

Link copied to clipboard
abstract val isUnsignedByte: Boolean

Is the receiver an Avail unsigned byte?

Link copied to clipboard
open val notNil: Boolean

Test if the receiver is not the nil value.

Inheritors

Link copied to clipboard

Extensions

Link copied to clipboard
val A_Phrase.allTokens: A_Tuple

Answer all tokens belong to the receiver or its subexpressions, lexically ordered, without positionless synthetic tokens.

Link copied to clipboard
val A_Phrase.apparentSendName: A_Atom

Answer the A_Atom that this phrase is a send of. If this is a macro invocation, answer the A_Atom that the original expression, prior to macro transformation, was an apparent send of. If the phrase is neither a send nor a macro invocation, answer nil.

Link copied to clipboard
fun A_Phrase.applyStylesThen(    context: CompilationContext,     visitedSet: MutableSet<A_Phrase>,     then: () -> Unit)

Apply styles for this phrase in the context. Apply the styles for interesting subcomponents first. After these styles have been applied, invoke the then continuation action.

Link copied to clipboard
val A_Phrase.argumentsListNode: A_Phrase

Answer the list phrase that provides arguments to this send phrase. If this is a macro invocation, these are the arguments supplied to the macro's output, which must be a send phrase.

Link copied to clipboard
val A_Phrase.argumentsTuple: A_Tuple

Answer the tuple of argument declaration phrases of this block phrase.

Link copied to clipboard
val A_Phrase.bundle: A_Bundle

Answer this send phrase's message bundle. If this is a macro invocation, answer the message bundle that is the one sent by the resulting send phrase.

Link copied to clipboard
fun A_Phrase.childrenDo(action: (A_Phrase) -> Unit)

Perform the given action for each child phrase of this phrase.

Link copied to clipboard
fun A_Phrase.childrenMap(transformer: (A_Phrase) -> A_Phrase)

Perform the given transformation for each child phrase of this phrase, writing the result of the transformation back into this phrase. This phrase must be mutable.

Link copied to clipboard
fun A_Phrase.copyConcatenating(newListPhrase: A_Phrase): A_Phrase

Create a new list phrase with the elements of the given list phrase appended to the ones in the receiver.

Link copied to clipboard
fun A_Phrase.copyMutablePhrase(): A_Phrase

If the receiver is mutable, make its subobjects immutable and return it. Otherwise, make a mutable copy of the receiver and return it.

Link copied to clipboard
fun A_Phrase.copyWith(newPhrase: A_Phrase): A_Phrase

Create a new list phrase like the receiver, but with one more phrase added to the end of the list.

Link copied to clipboard
val A_Phrase.declaration: A_Phrase

Answer the declaration phrase referenced by this variable use phrase. If this phrase is a macro invocation, answer the declaration referenced by the variable use produced by the macro.

Link copied to clipboard
val A_Phrase.declaredExceptions: A_Set

Answer the set of exception types that are declared by this block phrase.

Link copied to clipboard
val A_Phrase.declaredType: A_Type

Answer the type of the variable, constant, or argument declared by this declaration phrase.

Link copied to clipboard
fun A_Phrase.emitAllValuesOn(codeGenerator: AvailCodeGenerator)

Emit code to push each value produced by the expressions of a list phrase or permuted list phrase.

Link copied to clipboard
fun A_Phrase.emitEffectOn(codeGenerator: AvailCodeGenerator)

Emit code to perform the effect of this phrase, leaving the operand stack the same as before these instructions.

Link copied to clipboard
fun A_Phrase.emitValueOn(codeGenerator: AvailCodeGenerator)

Emit code to perform this phrase, leaving its result on the stack.

Link copied to clipboard
val A_Phrase.expression: A_Phrase

If this phrase is an assignment, answer the expression that produces the value to assign. If this phrase is an expression-as-statement, answer the expression to treat as a statement. If this phrase is a super-cast, answer the expression that produces the actual value to send. If this phrase is a macro, use the above rules on the output of the macro.

Link copied to clipboard
fun A_Phrase.expressionAt(index: Int): A_Phrase

Extract the Nth expression of this list. If this is a permuted list phrase, do not transform the index.

Link copied to clipboard
val A_Phrase.expressionsSize: Int

Answer the number of expressions in this list phrase.

Link copied to clipboard
val A_Phrase.expressionsTuple: A_Tuple

Answer the tuple of expressions in this list phrase.

Link copied to clipboard
fun A_Phrase.flattenStatementsInto(accumulatedStatements: MutableList<A_Phrase>)

If this phrase is a sequence, take any statements within it that are also sequences, and flatten them all into one sequence, returning the List of statements. Handle first-of-sequence phrases correctly, allowing the resulting structure to be up to two layers deep.

Link copied to clipboard
fun A_Phrase.generateInModule(module: A_Module): A_RawFunction

Compile this block phrase into a raw function, recording within it that it was compiled within the given module.

Link copied to clipboard
val A_Phrase.hasSuperCast: Boolean

This is an expression acting as an argument, a recursive list phrase of arguments (perhaps permuted), or a super-cast. Answer whether it either is or contains within the recursive list structure a super-cast phrase.

Link copied to clipboard
val A_Phrase.initializationExpression: AvailObject

Answer the phrase producing the value to be assigned during initialization of a variabledeclaration. If there is no initialization expression, answer nil.

Link copied to clipboard
var A_Phrase.isLastUse: Boolean

Answer whether this variable use is the chronologically last time its variable will be used within this block.

Link copied to clipboard
val A_Phrase.isMacroSubstitutionNode: Boolean

Answer whether this phrase is a macro substitution phrase.

Link copied to clipboard
val A_Phrase.lastExpression: A_Phrase

Extract the last expression of this [listListPhraseDescriptor phrase. The client must ensure there is at least one, and that this is a list phrase.

Link copied to clipboard
val A_Phrase.list: A_Phrase

Answer the list phrase contained within this permuted list phrase. The order of the elements is the order in which they occurred in the source.

Link copied to clipboard
val A_Phrase.literalObject: A_BasicObject

This module constant's actual value, or this module variable's actual variable.

Link copied to clipboard
val A_Phrase.macroOriginalSendNode: A_Phrase

The receiver is a macro. Answer the send that was transformed by the macro body.

Link copied to clipboard
val A_Phrase.markerValue: A_BasicObject

Answer a marker phrase's marker value, which can be any AvailObject.

Link copied to clipboard
var A_Phrase.neededVariables: A_Tuple

The tuple of declaration phrases accessed by this block phrase. This value is set during code generation, even if the block phrase is immutable. It should not be made visible to the Avail language.

Link copied to clipboard
val A_Phrase.outputPhrase: A_Phrase

The phrase that this macro phrase generated to use as its replacement.

Link copied to clipboard
val A_Phrase.permutation: A_Tuple

Answer the permutation from a permutation list phrase. The permutation is a tuple of integers between 1 and the number of elements, where each value occurs exactly once, and the tuple is not in ascending order.

Link copied to clipboard
val A_Phrase.phraseExpressionType: A_Type

Return the phrase's expression type, which is the type of object that will be produced by this phrase.

Link copied to clipboard
val A_Phrase.phraseKind: PhraseTypeDescriptor.PhraseKind

Answer this phrase's PhraseKind.

Link copied to clipboard
fun A_Phrase.phraseKindIsUnder(expectedPhraseKind: PhraseTypeDescriptor.PhraseKind): Boolean

Test whether this phrase has a PhraseKind that is equal to or a subkind of the given PhraseKind.

Link copied to clipboard
val A_Phrase.primitive: Primitive?

Answer either null or the Primitive from a block phrase.

Link copied to clipboard
val A_Phrase.sequence: A_Phrase

Answer the sequence of statements inside this sequence-as-expression phrase.

Link copied to clipboard
val A_Phrase.startingLineNumber: Int

Answer this block phrase's starting line number in the source.

Link copied to clipboard
val A_Phrase.statements: A_Tuple

Answer the tuple of statement phrases in this sequence phrase.

Link copied to clipboard
fun A_Phrase.statementsDo(continuation: (A_Phrase) -> Unit)

Iterate through each sequence recursively within the receiver, applying the action to each contained statement phrase.

Link copied to clipboard
val A_Phrase.statementsTuple: A_Tuple

Answer this block phrase's tuple of statement phrase.

Link copied to clipboard
val A_Phrase.stripMacro: A_Phrase

Given a list phrase, a permuted list phrase, or a macro substitution phrase, find all macro substitution phrases at or recursively inside it (but only within the nested list structure), answering a duplicate like the original, but with the macro phrases replaced by their output phrases.

Link copied to clipboard
val A_Phrase.superUnionType: A_Type

If this is a super cast phrase, then answer the type by which this argument should be looked up. If it is not and does not contain a super cast phrase in its recursive list phrase structure, then answer bottom. Otherwise create a (recursive) tuple type where elements that are supercasts provide their lookup types and the rest provide bottom.

Link copied to clipboard
val A_Phrase.token: A_Token

Answer the token which was used in the construction of a variable use phrase, a declaration phrase, a literal, or a macro that resolves to one of those.

Link copied to clipboard
val A_Phrase.tokens: A_Tuple

Answer the tuple of tokens that contributed to the phrase.

Link copied to clipboard
val A_Phrase.typeExpression: A_Phrase

Answer the phrase that produced the type of the declaration. Answer nil if there was no such phrase.

Link copied to clipboard
fun A_Phrase.validateLocally()

Validate this phrase without also visiting its subphrases.

Link copied to clipboard
val A_Phrase.variable: A_Phrase

Answer the variable use phrase that is used by this reference or assignment.