Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement $*GOAL
  • Loading branch information
sorear committed Oct 20, 2010
1 parent ce8fb09 commit f9817db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Niecza/Actions.pm
Expand Up @@ -468,6 +468,8 @@ sub quantified_atom { my ($cl, $M) = @_; # :: RxOp
$M->{_ast} = RxOp::None->new();
return;
}
$inner = $cl->encapsulate_regex($M, $inner, passcut => 1,
goal => $closer->text);
$atom = RxOp::Sequence->new(zyg => [$atom,
RxOp::Tilde->new(closer => $closer->text, dba => $::RX{dba} // '?',
zyg => [$inner])]); # TODO
Expand Down
4 changes: 4 additions & 0 deletions test2.pl
Expand Up @@ -97,6 +97,10 @@
is $m<c>, "f", "aliased [] transparent to captures";
is $m<moo>, "ef", "aliased [] captures string";
ok !$m<moo><b>, "no spurious nested captures";

my $save;
"()" ~~ / '(' ~ ')' { $save = $*GOAL } /;
is $save, ')', 'Setting $*GOAL works';
}

# {
Expand Down
1 change: 1 addition & 0 deletions v6/TODO
Expand Up @@ -28,6 +28,7 @@ Non-string parameterized role arguments
$<sym>
temp $*FOO
token { $param-role-var }
Make sure / (\w+) $0 / works

DONE:
~
Expand Down

0 comments on commit f9817db

Please sign in to comment.