File Coverage

blib/lib/Pegex/Tree.pm
Criterion Covered Total %
statement 9 10 90.0
branch 4 6 66.6
condition n/a
subroutine 3 3 100.0
pod 2 2 100.0
total 18 21 85.7


line stmt bran cond sub pod time code
1             package Pegex::Tree;
2 10     10   1671 use Pegex::Base;
  10         22  
  10         60  
3             extends 'Pegex::Receiver';
4              
5             sub gotrule {
6 281     281 1 388 my $self = shift;
7 281 100       747 @_ || return ();
8             return {$self->{parser}{rule} => $_[0]}
9 167 50       384 if $self->{parser}{parent}{-wrap};
10 167         566 return $_[0];
11             }
12              
13             sub final {
14 11     11 1 28 my $self = shift;
15 11 50       98 return(shift) if @_;
16 0           return [];
17             }
18              
19             1;