blib/lib/Zuzu/AST/Expr/TypeRef.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 100% 1 / 1 totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
evaluate
1.0
CRAP 1.0
« blib/lib/Zuzu/AST/Expr/Ternary.pm ↑ Summary blib/lib/Zuzu/AST/Expr/Unary.pm »
1 package Zuzu::AST::Expr::TypeRef;
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 'root' => ( is => 'rw' );
10 78 has 'member' => ( is => 'rw' );
11  
12 78 with 'Zuzu::AST::Role::Node';
13  
14 1511 ▶sub evaluate { $_[1]->eval_type_ref($_[0]) }
Subroutine evaluate: called CC=1 SCAR=0.0
Pod documented
15  
16 =pod
17  
18 =head1 NAME
19  
20 Zuzu::AST::Expr::TypeRef - AST node for type reference expressions
21  
22 =head1 DESCRIPTION
23  
24 Represents a type expression used in class inheritance and trait
25 composition, including imported names like C<mod{TypeName}>.
26  
27 =head1 INHERITANCE
28  
29 Inherits from C<Moo::Object>.
30  
31 =head1 ROLES
32  
33 Consumes C<Zuzu::AST::Role::Node>.
34  
35 =head1 ATTRIBUTES
36  
37 =head2 root
38  
39 Type: B<Str>.
40  
41 Base identifier of the referenced type value.
42  
43 =head2 member
44  
45 Type: B<Maybe[Str]>.
46  
47 Optional member name for dictionary-style type references.
48  
49 =head1 METHODS
50  
51 =head2 evaluate
52  
53 Dispatches this AST node to the matching runtime evaluator.
54  
55 =head1 SEE ALSO
56  
57 C<Zuzu::AST::Role::Node>.
58  
59 Subclasses: none in this distribution.
60  
61 =head1 COPYRIGHT AND LICENCE
62  
63 B<< Zuzu::AST::Expr::TypeRef >> is copyright Toby Inkster.
64  
65 It is free software; you may redistribute it and/or modify it under
66 the terms of either the Artistic License 1.0 or the GNU General Public
67 License version 2.
68  
69 =cut
70  
71 78 1;
« blib/lib/Zuzu/AST/Expr/Ternary.pm ↑ Summary blib/lib/Zuzu/AST/Expr/Unary.pm »