inc/Pegex/Tree.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 10 | 90.0 |
branch | 5 | 6 | 83.3 |
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | 2 | 2 | 100.0 |
total | 19 | 21 | 90.4 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Pegex::Tree; | ||||||
2 | 1 | 1 | 10824 | use Pegex::Base; | |||
1 | 3 | ||||||
1 | 8 | ||||||
3 | extends 'Pegex::Receiver'; | ||||||
4 | |||||||
5 | sub gotrule { | ||||||
6 | 166 | 166 | 1 | 165 | my $self = shift; | ||
7 | 166 | 100 | 389 | @_ || return (); | |||
8 | 120 | 100 | 374 | return {$self->{parser}{rule} => $_[0]} | |||
9 | if $self->{parser}{parent}{-wrap}; | ||||||
10 | 112 | 432 | return $_[0]; | ||||
11 | } | ||||||
12 | |||||||
13 | sub final { | ||||||
14 | 8 | 8 | 1 | 14 | my $self = shift; | ||
15 | 8 | 50 | 36 | return(shift) if @_; | |||
16 | 0 | return []; | |||||
17 | } | ||||||
18 | |||||||
19 | 1; |