File Coverage

blib/lib/Gherkin/Token.pm
Criterion Covered Total %
statement 14 14 100.0
branch 1 2 50.0
condition n/a
subroutine 5 6 83.3
pod 0 3 0.0
total 20 25 80.0


line stmt bran cond sub pod time code
1             package Gherkin::Token;
2             $Gherkin::Token::VERSION = '25.0.2';
3 2     2   14 use strict;
  2         5  
  2         91  
4 2     2   12 use warnings;
  2         4  
  2         132  
5              
6             use Class::XSAccessor
7             constructor => 'new',
8             accessors => [
9             qw/line location/,
10 2         24 map { "matched_$_" } qw/type keyword keyword_type
  14         43  
11             indent items text gherkin_dialect/
12             ],
13 2     2   13 ;
  2         4  
14              
15 256     256 0 347 sub is_eof { my $self = shift; return !$self->line }
  256         803  
16       0 0   sub detach { }
17              
18             sub token_value {
19 2     2 0 9 my $self = shift;
20 2 50       4 return $self->is_eof ? "EOF" : $self->line->get_line_text;
21             }
22              
23             1;