Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RT #107746, named capture when proceeded by a quantified capture
  • Loading branch information
moritz committed Jan 4, 2013
1 parent 0d9fc5d commit 288969f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion S05-capture/named.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 10;
plan 11;

=begin pod
Expand Down Expand Up @@ -61,4 +61,14 @@ Testing named capture variables nested inside each other. This doesn't appear to
is $<b>.elems, 0, '$<b> has no captures';
}

# RT #107746
{
grammar a {
token x { a };
token y { z };
rule TOP { [<x>]? [c || b <y>] }
};
is ~a.parse('a b z')<x>, 'a', 'can capture inside a || alternation even if previous capture was quantified (RT 107746)';
}

# vim: ft=perl6

0 comments on commit 288969f

Please sign in to comment.