Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add reduce, classify, categorize to commatraps
also, lambdas can also begin with -> or <->
  • Loading branch information
TimToady committed Apr 4, 2015
1 parent 4afc9e9 commit df5acd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Perl6/Actions.nqp
Expand Up @@ -103,7 +103,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
our $STATEMENT_PRINT;

# Could add to this based on signatures.
our %commatrap := nqp::hash('&grep', 1, '&map', 1, '&sort', 1);
our %commatrap := nqp::hash('&grep', 1, '&map', 1, '&sort', 1, '&reduce', 1, '&classify', 1, '&categorize', 1,);

INIT {
# If, e.g., we support Perl up to v6.1.2, set
Expand Down Expand Up @@ -4404,7 +4404,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
$prelen := 100 if $prelen > 100;
my $pre := nqp::substr($/.orig, $<longname>.from - $prelen, $prelen);
my $post := nqp::substr($/.orig, $<args>.to, 100);
if nqp::index($pre, "==>") < 0 && nqp::index($post, "<==") < 0 && $<args>.Str ~~ /^\s*'{'/ {
if nqp::index($pre, "==>") < 0 && nqp::index($post, "<==") < 0 && $<args>.Str ~~ /^\s*['{'|'->'|'<->']/ {
$/.CURSOR.missing("comma after block argument to " ~ nqp::substr(@name[0],1));
}
}
Expand Down

0 comments on commit df5acd2

Please sign in to comment.