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

Commit

Permalink
Add methodop arguments to named assertions.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Oct 16, 2009
1 parent f44ecaf commit 4c7671c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Regex/P6Regex/Actions.pm
Expand Up @@ -7,6 +7,10 @@ our @MODIFIERS := Q:PIR {
push %r, $P0
};
method arg($/) {
make $<quote> ?? ~$<quote><val> !! +$<val>;
}
method TOP($/) {
my $past := buildsub( $<nibbler>.ast );
$past.node($/);
Expand Down Expand Up @@ -315,6 +319,11 @@ method assertion:sym<name>($/) {
if $<nibbler> {
$past.push( buildsub($<nibbler>[0].ast) );
}
elsif $<arglist> {
for $<arglist>[0]<arg> {
$past.push( $_.ast );
}
}
}
make $past;
}
Expand Down

0 comments on commit 4c7671c

Please sign in to comment.