Skip to content

Commit

Permalink
implement ms// regex constructor
Browse files Browse the repository at this point in the history
Not sure if this is the best way, but all other ways I tried lead to a
significant more complex action method.
  • Loading branch information
moritz committed Oct 4, 2010
1 parent 7c74c0c commit 2ee5db9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Perl6/Grammar.pm
Expand Up @@ -1431,10 +1431,17 @@ token quote:sym<rx> {
<.cleanup_modifiers>
}
token quote:sym<m> {
<sym> >>
<sym> (s)?>>
[ <quotepair> <.ws> ]*
:my @*REGEX_ADVERBS;
{ @*REGEX_ADVERBS := $<quotepair>; }
{
if $/[0] {
my $s := Regex::Match.new();
$s.'!make'(PAST::Val.new(:value(1), :named('s')));
pir::push__vPP(@*REGEX_ADVERBS, $s);
}
}
<.setup_quotepairs>
[
| '/'<p6regex=.LANG('Regex','nibbler')>'/' <.old_rx_mods>?
Expand Down

0 comments on commit 2ee5db9

Please sign in to comment.