From da0c21f3d03b1295559b21d246659b5615a64019 Mon Sep 17 00:00:00 2001 From: Moritz Lenz Date: Tue, 27 Jul 2010 22:30:33 +0200 Subject: [PATCH] Quotes should respect :i Also substituted a Q:PIR block with pir::clone - no functional changes here. --- src/Regex/P6Regex/Actions.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Regex/P6Regex/Actions.pm b/src/Regex/P6Regex/Actions.pm index a207a18..9fdeeff 100644 --- a/src/Regex/P6Regex/Actions.pm +++ b/src/Regex/P6Regex/Actions.pm @@ -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; } @@ -167,6 +164,7 @@ method metachar:sym<'>($/) { my $quote := $.ast; if PAST::Val.ACCEPTS($quote) { $quote := $quote.value; } my $past := PAST::Regex.new( $quote, :pasttype('literal'), :node($/) ); + if @MODIFIERS[0] { $past.subtype('ignorecase'); } make $past; } @@ -174,6 +172,7 @@ method metachar:sym<">($/) { my $quote := $.ast; if PAST::Val.ACCEPTS($quote) { $quote := $quote.value; } my $past := PAST::Regex.new( $quote, :pasttype('literal'), :node($/) ); + if @MODIFIERS[0] { $past.subtype('ignorecase'); } make $past; }