line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Gherkin::ParserContext; |
2
|
|
|
|
|
|
|
$Gherkin::ParserContext::VERSION = '25.0.2'; |
3
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
|
|
14
|
use Class::XSAccessor accessors => |
7
|
1
|
|
|
1
|
|
5
|
[ qw/token_scanner token_matcher token_queue _errors/, ]; |
|
1
|
|
|
|
|
2
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
3
|
|
|
3
|
0
|
10
|
my ( $class, $options ) = @_; |
11
|
3
|
|
50
|
|
|
29
|
$options->{'token_queue'} ||= []; |
12
|
3
|
|
50
|
|
|
17
|
$options->{'_errors'} ||= []; |
13
|
3
|
|
|
|
|
9
|
bless $options, $class; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
0
|
0
|
0
|
sub add_tokens { my $self = shift; push( @{ $self->token_queue }, @_ ); } |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
17
|
3
|
|
|
3
|
0
|
7
|
sub errors { my $self = shift; return @{ $self->_errors } } |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
17
|
|
18
|
0
|
|
|
0
|
0
|
0
|
sub add_errors { my $self = shift; push( @{ $self->_errors }, @_ ); } |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub read_token { |
21
|
36
|
|
|
36
|
0
|
64
|
my ($self) = shift(); |
22
|
36
|
|
33
|
|
|
51
|
return shift( @{ $self->token_queue } ) || $self->token_scanner->read; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |