Branch Coverage

blib/lib/Perl6/Tokener.pm
Criterion Covered Total %
branch 26 86 30.2


line true false branch
323 12 0 unless ($t->prime)
325 12 724 if ($$t{'buffer'} =~ /^\Q$_\E/)
334 0 12 if $$t{'error'}
335 0 12 if ($$t{'hyper'})
345 0 12 if $$t{'next'}{'state'}
346 0 12 if ($$t{'next'}{'type'} and $$t{'next'}{'token'})
361 0 3 if $_[0] =~ s/^(\d+)//
362 0 3 if $_[0] =~ s/^((\w+|::)+)//
363 3 0 if $_[0] =~ s/^([\$\@%](\w+|::)+)//
364 0 0 if $_[0] =~ s/^(\$)$//
365 0 0 if $_[0] =~ s/^(\$[?!\$])//
375 0 3 if ($$t{'state'} eq 'OPERATOR')
379 0 3 if ($first eq '#')
390 0 3 if (length $ident == 1)
391 0 0 unless $$t{'buffer'}
406 0 0 if ($$t{'state'} eq 'OPERATOR')
428 0 4 if $$t{'buffer'} =~ s/^\n//
438 0 0 $$t{'state'} eq 'OPERATOR' ? :
446 0 0 $$t{'state'} eq 'OPERATOR' ? :
452 0 4 if ($$t{'state'} eq 'TERM' and not $options{'check'} eq 'no')
456 2 2 unless defined $options{'length'}
467 0 0 if ($$t{'state'} eq 'OPERATOR' and not $options{'check'} eq 'no')
471 0 0 unless defined $options{'length'}
481 0 0 unless $$t{'buffer'} =~ s/^ ( 0x[0-9A-Fa-f](_?[0-9A-Fa-f])* | 0[0-7](_?[0-7])* | 0b[01](_?[01])* | \.\d(_?\d)*[Ee][\+\-]?(\d(_?\d)*) | \d(_?\d)*(\.(\d(_?\d)*)?)?[Ee][\+\-]?(\d(_?\d)*) | [\d_]+(\.[\d_]+)? )//x
501 0 1 if ($$t{'token'} =~ /^(s|tr|y|m|qr)$/)
508 0 1 if ($$t{'token'} =~ /^(q|qq|qw|qx)$/)
517 0 1 if ($$t{'buffer'} =~ s/^((::\w+)+)//) { }
0 1 elsif ($$t{'buffer'} =~ s/^://) { }
0 1 elsif ($$t{'buffer'} =~ /^\s*=>/) { }
0 1 elsif (exists $keywords{$what}) { }
0 1 elsif ($$t{'buffer'} =~ /^\s*\(/) { }
526 0 0 if exists $keyword_tokens{$$t{'token'}}
543 0 0 if ($$t{'state'} ne 'OPERATOR')
547 0 0 if ($$t{'hyper'})
561 0 0 if $_ eq "\n"
574 0 0 if ($$t{'state'} eq 'OPERATOR')
584 0 0 if ($$t{'state'} eq 'OPERATOR') { }
593 1 0 if ($$t{'state'} eq 'OPERATOR') { }
605 0 1 if ($$t{'buffer'} =~ /-\w\w+/)
616 0 0 if ($$t{'state'} eq 'STATE') { }
626 0 0 if ($$t{'buffer'} =~ /^s*\(/) { }
636 0 0 if ($$t{'next'}{'type'}) { }
0 0 elsif ($$t{'buffer'} =~ /^s*\(/) { }