ShakeScope

interface ShakeScope(source)

Represents a scope in the Shake language. A scope is a context in which names and declarations (like variables, functions, classes) are defined.

Since

0.1.0

Inheritors

Properties

Link copied to clipboard
abstract val parent: ShakeScope?

The parent scope of this scope, if it exists. Null if this is a top-level scope.

Link copied to clipboard
abstract val uniqueName: String

The unique name of this scope, used for identification purposes.

Functions

Link copied to clipboard
abstract fun getClass(name: String): ShakeClass?

Retrieves a class by its name within this scope.

Link copied to clipboard
abstract fun getClasses(name: String): List<ShakeClass>

Retrieves all classes with the specified name within this scope.

Link copied to clipboard
abstract fun getField(name: String): ShakeAssignable?

Retrieves a field (variable) by its name within this scope.

Link copied to clipboard
abstract fun getFields(name: String): List<ShakeAssignable>

Retrieves all fields (variables) with the specified name within this scope.

Link copied to clipboard
abstract fun getFunctions(name: String): List<ShakeMethod>

Retrieves all functions with the specified name within this scope.

Link copied to clipboard
abstract fun getInvokable(name: String): List<ShakeInvokable>

Retrieves all invokable entities (like functions or methods) with the specified name within this scope.

Link copied to clipboard
abstract fun getSuper(): ShakeAssignable?

Retrieves the 'super' reference within this scope. 'Super' refers to the superclass object in object-oriented contexts.

abstract fun getSuper(name: String): ShakeAssignable?

Retrieves a field or method named 'name' from the 'super' object within this scope.

Link copied to clipboard
abstract fun getThis(): ShakeAssignable?

Retrieves the 'this' reference within this scope. 'This' refers to the current object in object-oriented contexts.

abstract fun getThis(name: String): ShakeAssignable?

Retrieves a field or method named 'name' from the 'this' object within this scope.

Link copied to clipboard
abstract fun use(name: String)

Indicates that a name is being used in this scope. This method can be used for tracking purposes, such as identifying unused variables.