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
Refactor named_assertion method a bit.
  • Loading branch information
pmichaud committed Jul 20, 2010
1 parent 11cd811 commit b09bf8d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Regex/P6Regex/Actions.pm
Expand Up @@ -408,6 +408,12 @@ method assertion:sym<name>($/) {
}
else {
$past := self.named_assertion($/);
if $<nibbler> {
$past.push( buildsub($<nibbler>[0].ast) );
}
elsif $<arglist> {
for $<arglist>[0].ast.list { $past.push( $_ ); }
}
}
make $past;
}
Expand Down Expand Up @@ -585,11 +591,5 @@ method named_assertion($/) {
my $name := ~$<longname>;
my $past := PAST::Regex.new( $name, :name($name),
:pasttype('subrule'), :subtype('capture'), :node($/) );
if $<nibbler> {
$past.push( buildsub($<nibbler>[0].ast) );
}
elsif $<arglist> {
for $<arglist>[0].ast.list { $past.push( $_ ); }
}
$past;
}

0 comments on commit b09bf8d

Please sign in to comment.