Branch Coverage

blib/lib/Language/Basic/Expression.pm
Criterion Covered Total %
branch 94 146 64.3


line true false branch
88 0 396 if $self->isa("Language::Basic::Expression::$_")
95 132 110 if ($subexp->isa("Language::Basic::$_"))
100 0 132 unless (defined $type)
211 0 280 if (defined $maybe_boolean and $maybe_boolean ne 'maybe_boolean')
217 2 278 if ($exp->isa('Language::Basic::Expression::Boolean'))
218 2 0 if ($maybe_boolean) { }
231 0 11 if ($exp->isa('Language::Basic::Expression::Boolean'))
239 268 10 unless @ops
266 28 0 if ($op eq '+') { }
282 0 0 if ($op eq '+') { }
305 7 0 if ($op eq '+') { }
344 0 291 if (defined $maybe_boolean and $maybe_boolean ne 'maybe_boolean')
350 2 289 if ($exp->isa('Language::Basic::Expression::Boolean'))
351 2 0 if ($maybe_boolean) { }
364 0 7 if ($exp->isa('Language::Basic::Expression::Boolean'))
373 284 5 unless @ops
394 8 2 if ($op eq '*') { }
451 0 298 if (defined $maybe_boolean and $maybe_boolean ne 'maybe_boolean')
456 6 292 if defined $token_group->eat_if_string('-')
466 8 290 if (defined $token_group->eat_if_class('Left_Paren')) { }
12 278 elsif (defined($try = 'Language::Basic::Expression::Function'->new($token_group))) { }
42 236 elsif (defined($try = 'Language::Basic::Expression::Lvalue'->new($token_group))) { }
236 0 elsif (defined($try = 'Language::Basic::Expression::Constant'->new($token_group))) { }
471 0 8 unless defined $token_group->eat_if_class('Right_Paren')
474 0 8 if ($try->isa('Language::Basic::Expression::Boolean') and not $maybe_boolean)
498 0 0 unless my $tok = $token_group->lookahead
506 12 286 if ($$self{'nested'} or $$self{'minus'}) { }
522 10 6 if $$self{'minus'}
528 0 0 $$self{'minus'} ? :
531 0 0 if ($$self{'nested'})
570 221 38 if (defined($try = 'Language::Basic::Expression::Constant::Numeric'->new($token_group))) { }
38 0 elsif (defined($try = 'Language::Basic::Expression::Constant::String'->new($token_group))) { }
593 221 38 if (defined(my $tok = $token_group->eat_if_class('Numeric_Constant'))) { }
614 38 0 if (defined(my $tok = $token_group->eat_if_class('String_Constant'))) { }
677 236 90 unless defined(my $tok = $token_group->eat_if_class('Identifier'))
685 13 77 if (defined(my $arglist = 'Language::Basic::Expression::Arglist'->new($token_group)))
718 54 312 if (defined(my $arglist = $$self{'arglist'}))
731 0 0 if (defined $$self{'arglist'})
781 236 57 unless $tok->isa('Language::Basic::Token::Identifier')
790 3 54 if ($defining) { }
793 0 3 unless $name =~ /^FN/
796 42 12 unless $func = &Language::Basic::Function::lookup($name)
809 3 12 if ($defining) { }
811 0 3 unless defined $token_group->eat_if_class('Left_Paren')
818 0 3 unless defined $token_group->eat_if_class('Right_Paren')
825 0 12 unless my $arglist = 'Language::Basic::Expression::Arglist'->new($token_group)
855 0 0 if ($ret =~ /(fun|bas)$/)
885 77 25 unless defined $token_group->eat_if_class('Left_Paren')
896 0 25 unless defined $token_group->eat_if_class('Right_Paren')
898 0 25 unless (@args)
952 0 36 if (defined $maybe_arithmetic and $maybe_arithmetic ne 'maybe_arithmetic')
958 6 30 unless ($exp->isa('Language::Basic::Expression::Boolean'))
959 6 0 if ($maybe_arithmetic) { }
970 0 6 unless ($exp->isa('Language::Basic::Expression::Boolean'))
977 24 6 if @exps == 1
1026 0 42 if (defined $maybe_arithmetic and $maybe_arithmetic ne 'maybe_arithmetic')
1032 6 36 unless ($exp->isa('Language::Basic::Expression::Boolean'))
1033 6 0 if ($maybe_arithmetic) { }
1044 0 6 unless ($exp->isa('Language::Basic::Expression::Boolean'))
1051 30 6 if @exps == 1
1113 0 48 if (defined $maybe_arithmetic and $maybe_arithmetic ne 'maybe_arithmetic')
1120 0 48 unless my $e = 'Language::Basic::Expression::Arithmetic'->new($token_group, 'maybe_boolean')
1127 2 46 if ($e->isa('Language::Basic::Expression::Boolean'))
1135 6 40 unless (defined($tok = $token_group->eat_if_class('Relational_Operator')))
1137 6 0 if ($maybe_arithmetic) { }
1147 0 40 unless my $e2 = 'Language::Basic::Expression::Arithmetic'->new($token_group)
1168 0 40 $e->isa('Language::Basic::Expression::String') ? :
1170 0 40 unless my $perlop = $$trans{$op}
1187 36 2 if (not $exp->isa('Language::Basic::Expression::Boolean')) { }
1203 4 34 if $$self{'not'}
1215 0 0 if (not $exp->isa('Language::Basic::Expression::Boolean')) { }
1225 0 0 if ($$self{'not'})
1227 0 0 unless $ret =~ /^\(.*\)$/