Permalink
Browse files

Implement m// and rx//

  • Loading branch information...
1 parent 7caeccd commit 433320189415e345d43e26f658abd038b75d83ab @sorear committed Feb 19, 2011
Showing with 11 additions and 1 deletion.
  1. +1 −1 TODO
  2. +10 −0 src/niecza
View
2 TODO
@@ -26,7 +26,7 @@ EASY
Stuff spectests are blocking on: "Block", "&hash", "writable $_",
"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
View
@@ -23,6 +23,16 @@ use NieczaActions;
use OpHelpers;
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/;
niecza -- a command line wrapper for Niecza

0 comments on commit 4333201

Please sign in to comment.