File Coverage

blib/lib/Pegex/TOML/Data.pm
Criterion Covered Total %
statement 6 9 66.6
branch n/a
condition n/a
subroutine 2 3 66.6
pod 0 1 0.0
total 8 13 61.5


line stmt bran cond sub pod time code
1             package Pegex::TOML::Data;
2 1     1   7 use Pegex::Base;
  1         3  
  1         6  
3             extends 'Pegex::Tree';
4              
5 1     1   1838 use boolean;
  1         1110  
  1         4  
6              
7             sub got_value_line {
8 0     0 0   my ($self, $got) = @_;
9 0           my ($key, $val) = @$got;
10 0           return {$key => $val};
11             }
12              
13             # sub got_toml { $_[1][0] }
14             # sub got_object { +{map @$_, map @$_, @{(pop)}} }
15             # sub got_array { [map @$_, @{(pop)}] }
16             #
17             # my %escapes = (
18             # '"' => '"',
19             # '/' => "/",
20             # "\\" => "\\",
21             # b => "\b",
22             # f => "\x12",
23             # n => "\n",
24             # r => "\r",
25             # t => "\t",
26             # );
27             #
28             # sub got_string {
29             # my $string = pop;
30             # $string =~ s/\\(["\/\\bfnrt])/$escapes{$1}/ge;
31             # # This handles TOML encoded Unicode surrogate pairs
32             # $string =~ s/\\u([0-9a-f]{4})\\u([0-9a-f]{4})/pack "U*", hex("$1$2")/ge;
33             # $string =~ s/\\u([0-9a-f]{4})/pack "U*", hex($1)/ge;
34             # return $string;
35             # }
36             #
37             # sub got_number { $_[1] + 0 }
38             # sub got_true { &boolean::true }
39             # sub got_false { &boolean::false }
40             # sub got_null { undef }
41              
42             1;