ShakeDeclaration

Represents a declaration in the Shake language, such as a variable, a function, or a class. A declaration is a named entity that can be assigned a value or type.

Since

0.1.0

Inheritors

Properties

Link copied to clipboard
abstract val actualType: ShakeType

The actual type of the assignable entity.

Link copied to clipboard
abstract val actualValue: ShakeValue?

The actual value of the assignable entity.

Link copied to clipboard
abstract val name: String

The name of the declaration.

Link copied to clipboard
abstract val qualifiedName: String

The fully qualified name of the declaration, including its scope and namespace.

Link copied to clipboard
abstract val type: ShakeType

The declared type of the assignable entity.

Link copied to clipboard
abstract val uniqueName: String

A unique name for the declaration, used internally for identification.

Functions

Link copied to clipboard

Performs addition assignment on this entity's type.

Link copied to clipboard
open fun assignType(other: ShakeType, scope: ShakeScope): ShakeType?

Assigns a type to this entity.

Link copied to clipboard

Handles the type after decrement operation.

Link copied to clipboard

Handles the type before decrement operation.

Link copied to clipboard

Performs division assignment on this entity's type.

Link copied to clipboard

Handles the type after increment operation.

Link copied to clipboard

Handles the type before increment operation.

Link copied to clipboard
open fun modulusAssignType(other: ShakeType, scope: ShakeScope): ShakeType?

Performs modulus assignment on this entity's type.

Link copied to clipboard

Performs multiplication assignment on this entity's type.

Link copied to clipboard
open fun powerAssignType(other: ShakeType, scope: ShakeScope): ShakeType?

Performs power assignment on this entity's type.

Link copied to clipboard

Performs subtraction assignment on this entity's type.

Link copied to clipboard
abstract fun toJson(): Map<String, Any?>

Converts the declaration to a JSON representation. Useful for serialization or debugging purposes.