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 = '41.0.0';
3 2     2   12 use strict;
  2         4  
  2         81  
4 2     2   9 use warnings;
  2         4  
  2         203  
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         36  
11             indent items text gherkin_dialect/
12             ],
13 2     2   10 ;
  2         4  
14              
15 94     94 0 94 sub is_eof { my $self = shift; return !$self->line }
  94         215  
16              
17             sub token_value {
18 2     2 0 7 my $self = shift;
19 2 50       4 return $self->is_eof ? "EOF" : $self->line->get_line_text;
20             }
21              
22             1;