| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Gherkin::ParserContext; | 
| 2 |  |  |  |  |  |  | $Gherkin::ParserContext::VERSION = '25.0.1'; | 
| 3 | 1 |  |  | 1 |  | 7 | use strict; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 29 |  | 
| 4 | 1 |  |  | 1 |  | 4 | use warnings; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 34 |  | 
| 5 |  |  |  |  |  |  |  | 
| 6 | 1 |  |  |  |  | 9 | use Class::XSAccessor accessors => | 
| 7 | 1 |  |  | 1 |  | 5 | [ qw/token_scanner token_matcher token_queue _errors/, ]; | 
|  | 1 |  |  |  |  | 1 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | sub new { | 
| 10 | 3 |  |  | 3 | 0 | 7 | my ( $class, $options ) = @_; | 
| 11 | 3 |  | 50 |  |  | 17 | $options->{'token_queue'} ||= []; | 
| 12 | 3 |  | 50 |  |  | 15 | $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 |  |  |  |  | 4 |  | 
|  | 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 | 62 | my ($self) = shift(); | 
| 22 | 36 |  | 33 |  |  | 46 | return shift( @{ $self->token_queue } ) || $self->token_scanner->read; | 
| 23 |  |  |  |  |  |  | } | 
| 24 |  |  |  |  |  |  |  | 
| 25 |  |  |  |  |  |  | 1; |