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