Branch Coverage

blib/lib/ExtUtils/XSpp/Lexer.pm
Criterion Covered Total %
branch 63 80 78.7


line true false branch
104 0 33 unless get_lex_mode($p) eq $mode
114 88 753 unless (defined $v)
115 2 86 if ($_[0]->YYData->{'LEX'}{'NEXT'}) { }
119 2 0 if length $$buf
136 0 12 $p->YYData->{'LEX'}{'FILE'} ? :
152 163 8 unless $_[0]->YYData->{'LEX'}{'CONDITIONAL'}
153 0 8 unless @{$_[0]->YYData->{'LEX'}{'CONDITIONAL'};}
162 86 752 unless (length $$buf or $buf = read_more($_[0]))
166 81 3489 if (get_lex_mode($_[0]) eq 'special') { }
167 33 48 if ($$buf =~ s/^%}//) { }
48 0 elsif ($$buf =~ s/^([^\n]*)\n$//) { }
172 27 21 if ($line =~ /^(.*?)\%}(.*)$/)
181 684 2805 unless length $$buf
183 1 2804 if ($$buf =~ s/^([+-]?0x[0-9a-fA-F]+)//) { }
14 2790 elsif ($$buf =~ s/^([+-]?(?=\d|\.\d)\d*(?:\.\d*)?(?:[Ee](?:[+-]?\d+))?)//) { }
4 2786 elsif ($$buf =~ s[^//(.*)(?:\r\n|\r|\n)][]) { }
1 2785 elsif ($$buf =~ m[^/\*]) { }
300 2485 elsif ($$buf =~ s/^(\%\w+)//) { }
1491 994 elsif ($$buf =~ s[^( \%} | \%\{ | \{\% | [{}();%~*&,=/\.\-<>|] | :: | : )][]x) { }
0 994 elsif ($$buf =~ s/^(INCLUDE(?:_COMMAND)?:.*)(?:\r\n|\r|\n)//) { }
954 40 elsif ($$buf =~ s/^([a-zA-Z_]\w*)//) { }
0 40 elsif ($$buf =~ s/^("[^"]*")//) { }
22 18 elsif ($$buf =~ s/^(#\s*(if|ifdef|ifndef|else|elif|endif)\b.*)(?:\r\n|\r|\n)//) { }
18 0 elsif ($$buf =~ s/^(#.*)(?:\r\n|\r|\n)//) { }
187 14 0 if $v =~ /^[+-]?\d+$/
194 1 3 if ($$buf =~ s[(.*?\*/)][])
202 241 59 if exists $tokens{$1}
213 316 638 if exists $keywords{$1}
220 11 10 if ($2 eq 'else' or $2 eq 'elif' or $2 eq 'endif')
223 12 10 if ($2 ne 'endif')
242 0 0 $buf ? :
338 6 2 if ($$any{'NAME'} eq 'accessors')
341 6 0 if ($args{'get_style'})
342 6 0 if (@{$args{'get_style'};}) { }
348 6 0 if ($args{'set_style'})
349 6 0 if (@{$args{'set_style'};}) { }
380 52 1627 if (defined $$paramlist[$i] and $$paramlist[$i] eq $key)
384 5 47 ref $_ eq 'ARRAY' ? :
410 44 0 if exists $args{'alias'}
434 44 0 if exists $args{'alias'}