ShakeNew

Represents a 'new' expression in the Shake language. This is used to create new instances of classes, invoking constructors with specified arguments.

Since

0.1.0

Inheritors

Properties

Link copied to clipboard
abstract val arguments: List<ShakeValue>

The list of arguments to be passed to the constructor.

Link copied to clipboard
abstract val name: String

The name of the class or entity being instantiated.

Link copied to clipboard
abstract val parent: ShakeValue?

The parent value, if any, of the new instance being created. This can be used in cases where nested member initialization is involved.

Link copied to clipboard
abstract val project: ShakeProject

The project to which this value belongs.

Link copied to clipboard

The constructor reference which is to be invoked by this 'new' expression.

Link copied to clipboard
abstract val type: ShakeType

The type of this value.

Functions

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

Converts this value to a JSON representation. Useful for serialization, debugging, or for interfacing with external systems.