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

Commit

Permalink
Quotes should respect :i
Browse files Browse the repository at this point in the history
Also substituted a Q:PIR block with pir::clone - no functional changes here.
  • Loading branch information
moritz committed Jul 27, 2010
1 parent 96bc191 commit da0c21f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Regex/P6Regex/Actions.pm
Expand Up @@ -30,10 +30,7 @@ method TOP($/) {
method nibbler($/, $key?) {
if $key eq 'open' {
my %old := @MODIFIERS[0];
my %new := Q:PIR {
$P0 = find_lex '%old'
%r = clone $P0
};
my %new := pir::clone__pp(%old);
@MODIFIERS.unshift(%new);
return 1;
}
Expand Down Expand Up @@ -167,13 +164,15 @@ method metachar:sym<'>($/) {
my $quote := $<quote_EXPR>.ast;
if PAST::Val.ACCEPTS($quote) { $quote := $quote.value; }
my $past := PAST::Regex.new( $quote, :pasttype('literal'), :node($/) );
if @MODIFIERS[0]<i> { $past.subtype('ignorecase'); }
make $past;
}

method metachar:sym<">($/) {
my $quote := $<quote_EXPR>.ast;
if PAST::Val.ACCEPTS($quote) { $quote := $quote.value; }
my $past := PAST::Regex.new( $quote, :pasttype('literal'), :node($/) );
if @MODIFIERS[0]<i> { $past.subtype('ignorecase'); }
make $past;
}

Expand Down

0 comments on commit da0c21f

Please sign in to comment.