Pegex/Tree.pm

filter: Statementstmt 100% 12 / 12 Branchbran 100% 6 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 100% 2 / 2 totaltotal 100% 23 / 23 CC 4 SCAR 8.5
CC
4
Cov
100%
gotrule
3.0
final
2.0
BEGIN
1.0
CRAP 2.3
« Pegex/Base.pm ↑ Summary Pegex/Tree/Wrap.pm »
1 package Pegex::Tree;
2 17 ▶use Pegex::Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 17 extends 'Pegex::Receiver';
4  
5 3517 ▶sub gotrule {
Subroutine gotrule: called CC=3 SCAR=11.0
Pod documented
6 3517 my $self = shift;
7 3517 ▶ @_ || return ();
Branch: 1 branch
BranchTrueFalseTotal
@_ or return () 2176 1341 3517
8 return {$self->{parser}{rule} => $_[0]}
9 2176 ▶ if $self->{parser}{parent}{-wrap};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"parser"}{"parent"}{"-wrap"} 1 2175 2176
10 2175 return $_[0];
11 }
12  
13 220 ▶sub final {
Subroutine final: called CC=2 SCAR=6.9
Pod documented
14 220 my $self = shift;
15 220 ▶ return(shift) if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 219 1 220
16 1 return [];
17 }
18  
19 17 1;
« Pegex/Base.pm ↑ Summary Pegex/Tree/Wrap.pm »