blib/lib/Zuzu/AST/Expr/Range.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/New.pm ↑ Summary blib/lib/Zuzu/AST/Expr/Set.pm »
1 package Zuzu::AST::Expr::Range;
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 'start' => ( is => 'rw' );
10 78 has 'end' => ( is => 'rw' );
11  
12 78 with 'Zuzu::AST::Role::Node';
13  
14 7 ▶sub evaluate { $_[1]->eval_range($_[0]) }
Subroutine evaluate: called CC=1 SCAR=0.0
Pod documented
15  
16 =pod
17  
18 =head1 NAME
19  
20 Zuzu::AST::Expr::Range - AST node for inclusive integer ranges
21  
22 =head1 DESCRIPTION
23  
24 Represents an inclusive integer range expression used inside array
25 literals, for example C<[ 1...5 ]> or C<[ 5...1 ]>.
26  
27 =head1 ATTRIBUTES
28  
29 =head2 start
30  
31 Type: expression node.
32  
33 The expression that provides the first value in the range.
34  
35 =head2 end
36  
37 Type: expression node.
38  
39 The expression that provides the last value in the range.
40  
41 =head1 METHODS
42  
43 =head2 evaluate
44  
45 Dispatches this AST node to C<Zuzu::Runtime::eval_range>.
46  
47 =head1 COPYRIGHT AND LICENCE
48  
49 B<< Zuzu::AST::Expr::Range >> is copyright Toby Inkster.
50  
51 It is free software; you may redistribute it and/or modify it under
52 the terms of either the Artistic License 1.0 or the GNU General Public
53 License version 2.
54  
55 =cut
56  
57 78 1;
« blib/lib/Zuzu/AST/Expr/New.pm ↑ Summary blib/lib/Zuzu/AST/Expr/Set.pm »