Branch Coverage

lib/Type/Parser.pm
Criterion Covered Total %
branch 92 102 90.2


line true false branch
44 113 145 wantarray ? :
51 1 0 wantarray ? :
58 2 108 if $tail =~ /\S/ms
66 2 51 unless ($std)
78 72 365 if ($node->{'type'} eq "list")
82 39 326 if ($node->{'type'} eq "union")
86 8 318 if ($node->{'type'} eq "intersect")
93 2 316 if ($node->{'type'} eq "slash")
95 0 2 unless @types == 2
100 2 314 if ($node->{'type'} eq "slurpy")
105 4 310 if ($node->{'type'} eq "complement")
109 66 244 if ($node->{'type'} eq "parameterized")
112 2 0 unless $base->is_parameterizable or $node->{'params'}
114 62 2 $node->{'params'} ? :
117 12 232 if ($node->{'type'} eq "primary" and $node->{'token'}->type eq "CLASS")
126 12 220 if ($node->{'type'} eq "primary" and $node->{'token'}->type eq "QUOTELIKE")
130 6 214 if ($node->{'type'} eq "primary" and $node->{'token'}->type eq "STRING")
134 3 211 if ($node->{'type'} eq "primary" and $node->{'token'}->type eq "HEXNUM")
137 1 2 if ($spelling =~ /^[+-]/)
142 1 2 $sign eq '-' ? :
146 211 0 if ($node->{'type'} eq "primary" and $node->{'token'}->type eq "TYPE")
148 13 198 $t =~ /^(.+)::(\w+)$/ ? :
152 6 205 unless $r
160 10 427 if ($expr->{'type'} eq "expression" and $expr->{'op'}[0] eq "COMMA")
164 39 388 if ($expr->{'type'} eq "expression" and $expr->{'op'}[0] eq "UNION")
168 8 380 if ($expr->{'type'} eq "expression" and $expr->{'op'}[0] eq "INTERSECT")
172 2 378 if ($expr->{'type'} eq "expression" and $expr->{'op'}[0] eq "SLASH")
186 14 132 if ($expr->{'type'} eq 'expression' and $expr->{'op'}[0] eq $op) { }
227 4 803 if ($tokens->peek(0)->type eq "NOT")
236 2 801 if ($tokens->peek(0)->type eq "SLURPY")
245 9 792 if ($tokens->peek(0)->type eq "L_PAREN")
252 265 473 if ($tokens->peek(1) and $tokens->peek(0)->type eq "TYPE" and $tokens->peek(1)->type eq "L_BRACKET")
263 4 261 if ($tokens->peek(0)->type eq 'R_BRACKET') { }
269 261 0 unless $params->{'type'} eq "list"
280 17 3 if ($type eq "TYPE" or $type eq "QUOTELIKE" or $type eq "STRING" or $type eq "HEXNUM" or $type eq "CLASS")
394 0 1613 unless $self->_stack_size
398 1613 26 if (ref $item)
404 0 1613 if (@_ and $_[0] ne $r->type)
414 0 1078 if $self->empty
426 1589 32 unless length $space
434 5 119 ref $_ ? :
455 0 1621 if $self->{'remaining'} eq ""
460 824 797 if ($self->{'remaining'} =~ m(^( => | [()\]\[|&~,/] ))msx)
466 153 644 if ($self->{'remaining'} =~ /\A\s*[q'"]/ms)
468 153 0 if (my $quotelike = &Text::Balanced::extract_quotelike($self->{'remaining'}))
473 641 3 if ($self->{'remaining'} =~ /^([+-]?[\w:.+]+)/ms)
477 14 627 if ($spelling =~ /::$/ms) { }
3 624 elsif ($spelling =~ /^[+-]?0x[0-9A-Fa-f]+$/ms) { }
5 619 elsif (&looks_like_number($spelling)) { }
4 615 elsif ($self->{'remaining'} =~ /^\s*=>/ms) { }
2 613 elsif ($spelling eq 'slurpy') { }