Branch Coverage

blib/lib/Language/Basic/Statement.pm
Criterion Covered Total %
branch 66 146 45.2


line true false branch
123 0 193 if defined $line_num_ok and $line_num_ok ne 'line_num_ok'
136 0 193 unless defined $tok
139 171 22 if ($class eq 'Keyword') { }
6 16 elsif ($class eq 'Comment') { }
14 2 elsif ($class eq 'Identifier') { }
2 0 elsif ($line_num_ok and $class eq 'Numeric_Constant' and $tok->text =~ /^\d+$/) { }
141 171 0 if (exists $keywords{$text}) { }
222 0 3 unless my $funcexp = 'Language::Basic::Expression::Function'->new($token_group, 'defining')
225 0 3 unless $token_group->eat_if_string('=')
232 0 3 unless my $exp = 'Language::Basic::Expression::Arithmetic'->new($token_group)
338 0 10 unless my $lvalue = 'Language::Basic::Expression::Lvalue'->new($token_group)
341 0 10 if ($lvalue->isa('Language::Basic::Expression::String'))
347 0 10 unless $token_group->eat_if_string('=')
348 0 10 unless $$self{'start'} = 'Language::Basic::Expression::Arithmetic::Numeric'->new($token_group)
351 0 10 unless $token_group->eat_if_string('TO')
355 0 10 unless $$self{'limit'} = 'Language::Basic::Expression::Arithmetic::Numeric'->new($token_group)
362 2 8 if ($token_group->eat_if_string('STEP')) { }
363 0 2 unless $step = 'Language::Basic::Expression::Arithmetic::Numeric'->new($token_group)
367 0 8 if $token_group->stuff_left
434 0 5 unless $$self{'expression'} = 'Language::Basic::Expression::Arithmetic'->new($token_group)
442 0 7 unless ($goto =~ /^\d+$/)
465 0 0 if ($goto =~ /^\d+$/) { }
494 0 5 unless $$self{'expression'} = 'Language::Basic::Expression::Arithmetic'->new($token_group)
503 0 3 unless ($goto =~ /^\d+$/)
513 0 0 if ($goto =~ /^\d+$/) { }
539 0 28 unless my $exp = 'Language::Basic::Expression::Logical_Or'->new($token_group)
542 0 28 unless $token_group->eat_if_string('THEN')
560 0 28 unless my $then = 'Language::Basic::Statement'->new($t1, 'line_num_ok')
577 8 20 if (defined $token_group->eat_if_string('ELSE')) { }
579 0 8 unless $else = 'Language::Basic::Statement'->new($token_group, 'line_num_ok')
590 0 8 if $token_group->stuff_left
593 0 20 if $token_group->stuff_left
620 21 9 if ($$self{'condition'}->evaluate) { }
639 0 0 if (defined $$self{'else_s'})
674 0 0 if ($token_group->lookahead->isa('Language::Basic::Token::String_Constant'))
679 0 0 unless $token_group->eat_if_string(';')
685 0 0 unless my $exp = 'Language::Basic::Expression::Lvalue'->new($token_group)
693 0 0 exists $$self{'to_print'} ? :
709 0 0 if (@ins != @{$$self{'lvalues'};})
730 0 0 if (exists $$self{'to_print'})
745 0 0 if ($multi) { }
769 0 15 unless my $lvalue = 'Language::Basic::Expression::Lvalue'->new($token_group)
774 0 15 unless $token_group->eat_if_string('=')
775 0 15 unless $$self{'expression'} = 'Language::Basic::Expression::Arithmetic'->new($token_group)
814 0 10 unless my $lvalue = 'Language::Basic::Expression::Lvalue'->new($token_group)
817 0 10 if ($lvalue->variable->isa('Language::Basic::Variable::String'))
841 54 6 $step > 0 ? :
842 48 12 unless ($done)
884 0 2 unless $$self{'expression'} = 'Language::Basic::Expression::Arithmetic'->new($token_group)
889 0 2 unless defined $tok and $tok->text =~ /^GO(SUB|TO)$/
896 0 6 unless my $exp = 'Language::Basic::Expression::Arithmetic::Numeric'->new($token_group)
908 0 6 if (not $value =~ /^\d+$/ or $value > @{$$self{'gotos'};})
913 0 6 unless ($goto =~ /^\d+$/)
917 6 0 if $type eq 'GOSUB'
929 0 0 if (grep {not $_ =~ /^\d+$/;} @gotos)
941 0 0 if ($type eq 'GOSUB')
950 0 0 if ($type eq 'GOSUB')
971 2 78 unless ($token_group->stuff_left)
978 0 88 unless my $exp = 'Language::Basic::Expression::Arithmetic'->new($token_group)
981 73 15 if ($tok = $token_group->eat_if_class('Separator')) { }
15 0 elsif (not $token_group->stuff_left) { }
1004 0 90 if ($$prog{'column'} >= 70 and length $string)
1014 0 90 if ($endchar eq ',') { }
70 20 elsif ($endchar eq ';') { }
1019 0 0 if ($$prog{'column'} >= 56) { }
1030 50 20 if (ref($exp) =~ /::Numeric$/)
1052 0 0 if ref($exp) =~ /Numeric$/
1053 0 0 if ($endchar eq ',') { }
0 0 elsif ($endchar eq '') { }
1058 0 0 if @to_print
1061 0 0 if (@to_print) { }
1086 0 6 unless my $exp = 'Language::Basic::Expression::Lvalue'->new($token_group)
1161 0 13 unless my $gosub = $prog->pop_stack