Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Handle quantified aliases like $<var>=(subrule)* .
  • Loading branch information
pmichaud committed Oct 16, 2009
1 parent c9a4f85 commit c381a19
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Regex/P6Regex/Actions.pm
Expand Up @@ -199,7 +199,11 @@ method metachar:sym<var>($/) {
my $name := $<pos> ?? +$<pos> !! ~$<name>;
if $<quantified_atom> {
$past := $<quantified_atom>[0].ast;
if $past.pasttype eq 'subrule' {
if $past.pasttype eq 'quant' && $past[0].pasttype eq 'subrule' {
$past[0].subtype('capture');
$past[0].name($name);
}
elsif $past.pasttype eq 'subrule' {
$past.subtype('capture');
$past.name($name);
}
Expand Down

0 comments on commit c381a19

Please sign in to comment.