NAME
Zuzu::Value::Class - runtime value class for class values
DESCRIPTION
Represents class metadata needed for instantiation, inheritance, and static dispatch.
INHERITANCE
Inherits from Moo::Object.
ROLES
None.
ATTRIBUTES
name
Type: Str.
Identifier name declared or referenced by the node/value.
parent
Type: Maybe[InstanceOf["Zuzu::Value::Class"]].
Optional parent class used for inheritance lookups.
traits
Type: ArrayRef[InstanceOf["Zuzu::Value::Trait"]].
Trait values composed into this class.
field_specs
Type: ArrayRef[HashRef].
Field declaration metadata inherited during object creation.
methods
Type: HashRef[InstanceOf["Zuzu::Value::Function"]].
Instance method table for this class.
trait_methods
Type: HashRef[ArrayRef[InstanceOf["Zuzu::Value::Function"]]].
Trait-provided instance methods grouped by method name and preserved in trait composition order.
static_methods
Type: HashRef[InstanceOf["Zuzu::Value::Function"]].
Static method table for this class.
nested_classes
Type: HashRef[InstanceOf["Zuzu::Value::Class"]].
Nested class table scoped beneath this class.
closure_env
Type: Maybe[InstanceOf["Zuzu::Env"]].
Lexical environment captured when the class is declared.
source_node
Type: Maybe[InstanceOf["Zuzu::AST::Stmt::Class"]].
Original class declaration AST, retained for source extraction.
METHODS
is_truthy
Returns this runtime value's truthiness in ZuzuScript.
SEE ALSO
Subclasses: none in this distribution.
COPYRIGHT AND LICENCE
Zuzu::Value::Class is copyright Toby Inkster.
It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.