NAME

Zuzu::AST::Stmt::Method - AST node for method declarations

DESCRIPTION

Represents either an instance method or static method declaration inside a class body.

INHERITANCE

Inherits from Moo::Object.

ROLES

Consumes Zuzu::AST::Role::Node.

ATTRIBUTES

name

Type: Str.

Identifier name declared or referenced by the node/value.

params

Type: ArrayRef[Str].

Ordered list of named function parameters.

vararg

Type: Maybe[Str].

Optional parameter name that receives trailing arguments.

body

Type: InstanceOf["Zuzu::AST::Block"].

Function or loop block executed by the node/value.

is_static

Type: Bool.

Whether this method is invoked on the class instead of instances.

uses_super

Type: Maybe[Bool].

Whether this method uses super. undef means the method has not been analysed yet.

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::Method 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.