| 1 | package Zuzu::AST::Expr::MemberCall; | ||
| 2 | |||
| 3 | 78 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 78 | our $VERSION = '0.007002'; | |
| 6 | |||
| 7 | 78 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 78 | has 'object' => ( is => 'rw' ); | |
| 10 | 78 | has 'method' => ( is => 'rw' ); | |
| 11 | 78 | has 'args' => ( is => 'rw' ); | |
| 12 | |||
| 13 | 78 | with 'Zuzu::AST::Role::Node'; | |
| 14 | |||
| 15 | 72088 | ▶ | sub evaluate { |
|
Subroutine
evaluate: called CC=1 SCAR=0.0
Pod
documented
| |||
| 16 | 78 | ▶ | no warnings 'recursion'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | 72088 | $_[1]->eval_member_call($_[0]); | |
| 18 | } | ||
| 19 | |||
| 20 | =pod | ||
| 21 | |||
| 22 | =head1 NAME | ||
| 23 | |||
| 24 | Zuzu::AST::Expr::MemberCall - AST node for membercall expressions | ||
| 25 | |||
| 26 | =head1 DESCRIPTION | ||
| 27 | |||
| 28 | Represents one expression form in the abstract syntax tree and delegates evaluation to C<Zuzu::Runtime>. | ||
| 29 | |||
| 30 | =head1 INHERITANCE | ||
| 31 | |||
| 32 | Inherits from C<Moo::Object>. | ||
| 33 | |||
| 34 | =head1 ROLES | ||
| 35 | |||
| 36 | Consumes C<Zuzu::AST::Role::Node>. | ||
| 37 | |||
| 38 | =head1 ATTRIBUTES | ||
| 39 | |||
| 40 | =head2 object | ||
| 41 | |||
| 42 | Type: B<ConsumerOf["Zuzu::AST::Role::Node"]>. | ||
| 43 | |||
| 44 | Expression whose member/index is being accessed. | ||
| 45 | |||
| 46 | =head2 method | ||
| 47 | |||
| 48 | Type: B<Any>. | ||
| 49 | |||
| 50 | Value stored in the C<method> attribute. | ||
| 51 | |||
| 52 | =head2 args | ||
| 53 | |||
| 54 | Type: B<ArrayRef[ConsumerOf["Zuzu::AST::Role::Node"]]>. | ||
| 55 | |||
| 56 | Ordered argument expressions for a call. | ||
| 57 | |||
| 58 | =head1 METHODS | ||
| 59 | |||
| 60 | =head2 evaluate | ||
| 61 | |||
| 62 | Dispatches this AST node to the matching runtime evaluator. | ||
| 63 | |||
| 64 | =head1 SEE ALSO | ||
| 65 | |||
| 66 | C<Zuzu::AST::Role::Node>. | ||
| 67 | |||
| 68 | Subclasses: none in this distribution. | ||
| 69 | |||
| 70 | =head1 COPYRIGHT AND LICENCE | ||
| 71 | |||
| 72 | B<< Zuzu::AST::Expr::MemberCall >> is copyright Toby Inkster. | ||
| 73 | |||
| 74 | It is free software; you may redistribute it and/or modify it under | ||
| 75 | the terms of either the Artistic License 1.0 or the GNU General Public | ||
| 76 | License version 2. | ||
| 77 | |||
| 78 | =cut | ||
| 79 | |||
| 80 | 78 | 1; | |