Branch Coverage

lib/Type/Parser.pm
Criterion Covered Total %
branch 91 102 89.2


line true false branch
44 69 112 wantarray ? :
51 1 0 wantarray ? :
58 2 64 if $tail =~ /\S/ms
66 1 51 unless ($std)
78 59 253 if ($node->{'type'} eq "list")
82 18 235 if ($node->{'type'} eq "union")
86 8 227 if ($node->{'type'} eq "intersect")
93 2 225 if ($node->{'type'} eq "slash")
95 0 2 unless @types == 2
100 2 223 if ($node->{'type'} eq "slurpy")
105 4 219 if ($node->{'type'} eq "complement")
109 53 166 if ($node->{'type'} eq "parameterized")
112 2 0 unless $base->is_parameterizable or $node->{'params'}
114 49 2 $node->{'params'} ? :
117 8 158 if ($node->{'type'} eq "primary" and $node->{'token'}->type eq "CLASS")
126 12 146 if ($node->{'type'} eq "primary" and $node->{'token'}->type eq "QUOTELIKE")
130 6 140 if ($node->{'type'} eq "primary" and $node->{'token'}->type eq "STRING")
134 3 137 if ($node->{'type'} eq "primary" and $node->{'token'}->type eq "HEXNUM")
137 1 2 if ($spelling =~ /^[+-]/)
142 1 2 $sign eq '-' ? :
146 137 0 if ($node->{'type'} eq "primary" and $node->{'token'}->type eq "TYPE")
148 0 137 $t =~ /^(.+)::(\w+)$/ ? :
152 4 133 unless $r
160 10 302 if ($expr->{'type'} eq "expression" and $expr->{'op'}[0] eq "COMMA")
164 18 284 if ($expr->{'type'} eq "expression" and $expr->{'op'}[0] eq "UNION")
168 8 276 if ($expr->{'type'} eq "expression" and $expr->{'op'}[0] eq "INTERSECT")
172 2 274 if ($expr->{'type'} eq "expression" and $expr->{'op'}[0] eq "SLASH")
186 14 90 if ($expr->{'type'} eq 'expression' and $expr->{'op'}[0] eq $op) { }
227 4 610 if ($tokens->peek(0)->type eq "NOT")
236 2 608 if ($tokens->peek(0)->type eq "SLURPY")
245 9 599 if ($tokens->peek(0)->type eq "L_PAREN")
252 217 359 if ($tokens->peek(1) and $tokens->peek(0)->type eq "TYPE" and $tokens->peek(1)->type eq "L_BRACKET")
263 4 213 if ($tokens->peek(0)->type eq 'R_BRACKET') { }
269 213 0 unless $params->{'type'} eq "list"
280 13 3 if ($type eq "TYPE" or $type eq "QUOTELIKE" or $type eq "STRING" or $type eq "HEXNUM" or $type eq "CLASS")
394 0 1256 unless $self->_stack_size
398 1256 26 if (ref $item)
404 0 1256 if (@_ and $_[0] ne $r->type)
414 0 837 if $self->empty
426 1232 32 unless length $space
434 5 75 ref $_ ? :
455 0 1264 if $self->{'remaining'} eq ""
460 660 604 if ($self->{'remaining'} =~ m(^( => | [()\]\[|&~,/] ))msx)
466 130 474 if ($self->{'remaining'} =~ /\A\s*[q'"]/ms)
468 130 0 if (my $quotelike = &Text::Balanced::extract_quotelike($self->{'remaining'}))
473 471 3 if ($self->{'remaining'} =~ /^([+-]?[\w:.+]+)/ms)
477 10 461 if ($spelling =~ /::$/ms) { }
3 458 elsif ($spelling =~ /^[+-]?0x[0-9A-Fa-f]+$/ms) { }
5 453 elsif (&looks_like_number($spelling)) { }
4 449 elsif ($self->{'remaining'} =~ /^\s*=>/ms) { }
2 447 elsif ($spelling eq 'slurpy') { }