blib/lib/Zuzu/AST/Stmt/While.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/Stmt/Trait.pm ↑ Summary blib/lib/Zuzu/Error/Compile.pm »
1 package Zuzu::AST::Stmt::While;
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 'cond' => ( is => 'rw' );
10 78 has 'body' => ( is => 'rw' );
11  
12 78 with 'Zuzu::AST::Role::Node';
13  
14 7693 ▶sub evaluate { $_[1]->eval_while($_[0]) }
Subroutine evaluate: called CC=1 SCAR=0.0
Pod documented
15  
16 =pod
17  
18 =head1 NAME
19  
20 Zuzu::AST::Stmt::While - AST node for while statements
21  
22 =head1 DESCRIPTION
23  
24 Represents one statement form in the abstract syntax tree and delegates execution to C<Zuzu::Runtime>.
25  
26 =head1 INHERITANCE
27  
28 Inherits from C<Moo::Object>.
29  
30 =head1 ROLES
31  
32 Consumes C<Zuzu::AST::Role::Node>.
33  
34 =head1 ATTRIBUTES
35  
36 =head2 cond
37  
38 Type: B<ConsumerOf["Zuzu::AST::Role::Node"]>.
39  
40 Condition expression controlling branch/loop flow.
41  
42 =head2 body
43  
44 Type: B<InstanceOf["Zuzu::AST::Block"]>.
45  
46 Function or loop block executed by the node/value.
47  
48 =head1 METHODS
49  
50 =head2 evaluate
51  
52 Dispatches this AST node to the matching runtime evaluator.
53  
54 =head1 SEE ALSO
55  
56 C<Zuzu::AST::Role::Node>.
57  
58 Subclasses: none in this distribution.
59  
60 =head1 COPYRIGHT AND LICENCE
61  
62 B<< Zuzu::AST::Stmt::While >> is copyright Toby Inkster.
63  
64 It is free software; you may redistribute it and/or modify it under
65 the terms of either the Artistic License 1.0 or the GNU General Public
66 License version 2.
67  
68 =cut
69  
70 78 1;
« blib/lib/Zuzu/AST/Stmt/Trait.pm ↑ Summary blib/lib/Zuzu/Error/Compile.pm »