Skip to content

Commit

Permalink
Implement m// and rx//
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Feb 19, 2011
1 parent 7caeccd commit 4333201
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion TODO
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ EASY


Stuff spectests are blocking on: "Block", "&hash", "writable $_", Stuff spectests are blocking on: "Block", "&hash", "writable $_",
"closure for", "ranges of chars", "gather for", "closure for", "ranges of chars", "gather for",
"my regex / <&foo>", "m//", "my regex / <&foo>",


At least parsing Int et al on my-decls would help a lot At least parsing Int et al on my-decls would help a lot


Expand Down
10 changes: 10 additions & 0 deletions src/niecza
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ use NieczaActions;
use OpHelpers; use OpHelpers;
use Operator; use Operator;


augment class NieczaActions {
method quote:rx ($/) { make self.op_for_regex($/, $<quibble>.ast); }
method quote:m ($/) {
make mkcall($/, '&prefix:<?>',
::Op::CallMethod.new(|node($/), name => 'ACCEPTS',
receiver => self.op_for_regex($/, $<quibble>.ast),
args => [ mklex($/, '$_') ]));
}
}

my $usage = q:to/EOM/; my $usage = q:to/EOM/;
niecza -- a command line wrapper for Niecza niecza -- a command line wrapper for Niecza


Expand Down

0 comments on commit 4333201

Please sign in to comment.