Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Implement m// and rx//

  • Loading branch information...
commit 433320189415e345d43e26f658abd038b75d83ab 1 parent 7caeccd
@sorear authored
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
10 src/niecza
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.