NAME
Zuzu::AST::Stmt::Class - AST node for class statements
DESCRIPTION
Represents a class declaration with optional inheritance, fields, methods, and nested classes.
INHERITANCE
Inherits from Moo::Object.
ROLES
Consumes Zuzu::AST::Role::Node.
ATTRIBUTES
name
Type: Str.
Identifier name declared or referenced by the node/value.
parent
Type: Maybe[InstanceOf["Zuzu::AST::Expr::TypeRef"]].
Optional parent class name used for inheritance lookup.
traits
Type: ArrayRef[InstanceOf["Zuzu::AST::Expr::TypeRef"]].
Trait references mixed into this class via with or but.
fields
Type: ArrayRef[HashRef].
Ordered field declarations with name, is_const, and init.
methods
Type: ArrayRef[InstanceOf["Zuzu::AST::Stmt::Method"]].
Instance methods declared in this class.
static_methods
Type: ArrayRef[InstanceOf["Zuzu::AST::Stmt::Method"]].
Static methods declared in this class.
classes
Type: ArrayRef[InstanceOf["Zuzu::AST::Stmt::Class"]].
Nested class declarations scoped within this class.
METHODS
evaluate
Dispatches this AST node to the matching runtime evaluator.
SEE ALSO
Zuzu::AST::Role::Node.
Subclasses: none in this distribution.
COPYRIGHT AND LICENCE
Zuzu::AST::Stmt::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.