Branch Coverage

blib/lib/Jmespath/Parser.pm
Criterion Covered Total %
branch 77 82 93.9


line true false branch
55 862 0 unless defined $lookahead
67 0 861 if defined $cached
72 0 760 if (scalar keys %{$$self{'_CACHE'};} > $MAX_SIZE)
84 10 91 if ($_->isa('Jmespath::LexerException')) { }
11 80 elsif ($_->isa('Jmespath::IncompleteExpressionException')) { }
80 0 elsif ($_->isa('Jmespath::ParseException')) { }
110 4 760 if ($self->_current_token_type ne 'eof')
124 1565 334 defined $binding_power ? :
133 27 1872 unless (defined &$nud_function)
141 10 981 if (not defined &$led) { }
169 2 95 if ($self->_current_token_type eq 'lparen')
185 3 33 if ($self->_current_token_type eq 'rbracket') { }
226 42 15 if (&any(sub { $_ eq $self->_current_token_type; } , 'number', 'colon')) { }
10 5 elsif ($self->_current_token_type eq 'star' and $self->_lookahead(1) eq 'rbracket') { }
248 45 113 if ($self->_lookahead(0) eq 'colon' or $self->_lookahead(1) eq 'colon') { }
270 70 73 if ($current_token eq 'colon') { }
68 5 elsif ($current_token eq 'number') { }
272 2 68 if ($index == 3)
307 201 20 if ($self->_current_token_type ne 'star')
312 21 153 if ($left->{'type'} eq 'subexpression')
346 1 177 if ($left->{'type'} ne 'field')
363 77 175 if ($self->_current_token_type eq 'comma')
377 1 80 if ($self->_current_token_type eq 'flatten') { }
427 116 65 if (&any(sub { $_ eq $token->{'type'}; } , 'number', 'colon')) { }
429 17 92 if ($left->{'type'} eq 'index_expression')
446 38 92 if ($right->{'type'} eq 'slice')
468 31 27 if $self->_current_token_type eq 'rbracket'
494 29 35 if ($self->_current_token_type eq 'comma') { }
34 1 elsif ($self->_current_token_type eq 'rbrace') { }
507 160 175 if ($$BINDING_POWER{$self->_current_token_type} < $PROJECTION_STOP) { }
18 157 elsif ($self->_current_token_type eq 'lbracket') { }
1 156 elsif ($self->_current_token_type eq 'filter') { }
155 1 elsif ($self->_current_token_type eq 'dot') { }
542 273 83 if (&any(sub { $_ eq $lookahead; } , 'quoted_identifier', 'unquoted_identifier', 'star')) { }
35 48 elsif ($lookahead eq 'lbracket') { }
30 18 elsif ($lookahead eq 'lbrace') { }
563 5 22 if ($token->{'type'} eq 'eof')
580 1015 16 if ($self->_current_token_type eq $token_type) { }
593 5 67 unless (&any(sub { $_ eq $self->_current_token_type; } , @$token_types))
618 305 0 defined $number ? :
649 6 15 if ($actual_type eq 'eof')