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 = '39.0.0';
3 2     2   10 use strict;
  2         3  
  2         56  
4 2     2   7 use warnings;
  2         3  
  2         146  
5              
6             use Class::XSAccessor
7             constructor => 'new',
8             accessors => [
9             qw/line location/,
10 2         3 map { "matched_$_" } qw/type keyword keyword_type
  14         35  
11             indent items text gherkin_dialect/
12             ],
13 2     2   9 ;
  2         2  
14              
15 94     94 0 174 sub is_eof { my $self = shift; return !$self->line }
  94         394  
16       0 0   sub detach { }
17              
18             sub token_value {
19 2     2 0 6 my $self = shift;
20 2 50       4 return $self->is_eof ? "EOF" : $self->line->get_line_text;
21             }
22              
23             1;