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 5 100.0
pod 0 2 0.0
total 20 23 86.9


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