Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
don't claim TTIAR if 2nd term failed to parse
It's just a bogus term if it can't parse it...
  • Loading branch information
TimToady committed Feb 24, 2015
1 parent 629f5a4 commit f84e536
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Perl6/World.nqp
Expand Up @@ -2780,14 +2780,22 @@ class Perl6::World is HLL::World {
}
else {
my $expected_infix := 0;
my $expected_term := 0;
for @expected {
if nqp::index($_, "infix") >= 0 {
$expected_infix := 1;
last;
}
elsif nqp::index($_, "prefix or term") >= 0 {
$expected_term := 1;
}
}
if $expected_infix {
%opts<reason> := "Two terms in a row";
if $expected_term {
%opts<reason> := "Bogus term";
}
else {
%opts<reason> := "Two terms in a row";
}
}
}
}
Expand Down

0 comments on commit f84e536

Please sign in to comment.