Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[t/spec] RT #64104, constructing a Range in an action stub

git-svn-id: http://svn.pugscode.org/pugs@26723 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit e169d454651bf808a5f5b4ccbb2dd835ae8882e1 1 parent 43a7b3d
moritz authored
Showing with 16 additions and 1 deletion.
  1. +16 −1 S05-grammar/action-stubs.t
View
17 S05-grammar/action-stubs.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 9;
+plan 11;
# TODO: needs specs and smartlinks
@@ -73,4 +73,19 @@ is $action.calls, 'ab', '... and in the right order';
is $/.ast.[1], 'bbb', 'make $/ x 3 worked';
}
+# used to be a Rakudo regression, RT #64104
+{
+ grammar Math {
+ token TOP { ^ <value> $ {*} }
+ token value { \d+ {*} }
+ }
+ class Actions {
+ method value($/) { make 1..$/};
+ method TOP($/) { make 1 + $/<value>};
+ }
+ ok Math.parse('234', :action(Actions.new)),
+ 'can parse with action stubs that make() regexes';
+ is $/.ast, 235, 'got the right .ast';
+
+}
# vim: ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.