Skip to content

Commit

Permalink
demote bare say message in case of bogus term
Browse files Browse the repository at this point in the history
  • Loading branch information
TimToady committed Feb 24, 2015
1 parent efd2de0 commit 28329a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions STD.pm6
Expand Up @@ -4104,12 +4104,13 @@ grammar P6 is STD {
given +%deftrap{$name} {
.worry("Use of non-subscript <...> where postfix is expected; please use whitespace") if $_ and substr(self.orig, $¢.pos, 1) eq '<';
when 1 { # probably misused P5ism
$<identifier>.sorryobs("bare '$name'", ".$name if you meant \$_, or use an explicit invocant or argument");
$<identifier>.worryobs("bare '$name'", ".$name if you meant \$_, or use an explicit invocant or argument");
}
when 2 { # probably misused P6ism
$<identifier>.sorry("The '$name' listop may not be called without arguments (please use () or whitespace to clarify)");
$<identifier>.worry("The '$name' listop may not be called without arguments (please use () or whitespace to clarify)");
}
}
$<identifier>.sorry("No valid term seen where one is required");
}
}
}
Expand Down

0 comments on commit 28329a7

Please sign in to comment.