| 1 | package Gherkin::ParserContext; | ||||||||||||||||||||
| 2 | 1 | $Gherkin::ParserContext::VERSION = '42.0.1'; | |||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 1 | ▶ | use List::Util qw( uniq ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 1 | ▶ | use Class::XSAccessor accessors => | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | 1 | [ qw/token_scanner token_matcher token_queue _errors/, ]; | |||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||||||||||
| 12 | 3 | my ( $class, $options ) = @_; | |||||||||||||||||||
| 13 | 3 | ▶ | $options->{'token_queue'} ||= []; | ||||||||||||||||||
|
Condition50%1/2
$options->{"token_queue"} ||= []
MC/DC0%0/1
$options->{"token_queue"} ||= []
$options->{"token_queue"}
Truth table50%1/2
A
A= $options->{"token_queue"}
| |||||||||||||||||||||
| 14 | 3 | ▶ | $options->{'_errors'} ||= []; | ||||||||||||||||||
|
Condition50%1/2
$options->{"_errors"} ||= []
MC/DC0%0/1
$options->{"_errors"} ||= []
$options->{"_errors"}
Truth table50%1/2
A
A= $options->{"_errors"}
| |||||||||||||||||||||
| 15 | 3 | bless $options, $class; | |||||||||||||||||||
| 16 | } | ||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | 0 | ▶ | sub add_tokens { my $self = shift; push( @{ $self->token_queue }, @_ ); } | ||||||||||||||||||
|
Subroutine
add_tokens: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 19 | 3 | ▶ | sub errors { my $self = shift; return @{ $self->_errors } } | ||||||||||||||||||
|
Subroutine
errors: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 20 | 0 | ▶ | sub add_errors { | ||||||||||||||||||
|
Subroutine
add_errors: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 21 | 0 | my $self = shift; | |||||||||||||||||||
| 22 | 0 | push @{ $self->{'_errors'} }, @_; | |||||||||||||||||||
| 23 | } | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | 36 | ▶ | sub read_token { | ||||||||||||||||||
|
Subroutine
read_token: called CC=2 SCAR=7.6
Pod
undocumented
| |||||||||||||||||||||
| 26 | 36 | my ($self) = shift(); | |||||||||||||||||||
| 27 | 36 | ▶ | return shift( @{ $self->token_queue } ) || $self->token_scanner->read; | ||||||||||||||||||
|
Condition33%1/3
shift @{$self->token_queue;} || $self->token_scanner->read
MC/DC0%0/2
shift @{$self->token_queue;} || $self->token_scanner->read
shift @{$self->token_queue;}
$self->token_scanner->read
Truth table33%1/3
A || B
A= shift @{$self->token_queue;}B= $self->token_scanner->read
| |||||||||||||||||||||
| 28 | } | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | 1 | 1; | |||||||||||||||||||