-
-
Save ungrim97/47b970ed15ed629d9a49 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/QRegex/P6Regex/Actions.nqp b/src/QRegex/P6Regex/Actions.nqp | |
index 2eb8131..e76098e 100644 | |
--- a/src/QRegex/P6Regex/Actions.nqp | |
+++ b/src/QRegex/P6Regex/Actions.nqp | |
@@ -162,6 +162,7 @@ class QRegex::P6Regex::Actions is HLL::Actions { | |
} | |
else { | |
my $min := $<min>.ast; | |
+ if $min eq '^' { $min := 0 } | |
my $max := -1; | |
if ! $<max> { $max := $min } | |
elsif $<max> ne '*' { | |
diff --git a/src/QRegex/P6Regex/Grammar.nqp b/src/QRegex/P6Regex/Grammar.nqp | |
index 924d586..1abc959 100644 | |
--- a/src/QRegex/P6Regex/Grammar.nqp | |
+++ b/src/QRegex/P6Regex/Grammar.nqp | |
@@ -256,6 +256,7 @@ grammar QRegex::P6Regex::Grammar is HLL::Grammar { | |
token quantifier:sym<**> { | |
<sym> <.normspace>? <backmod> <.normspace>? | |
[ | |
+ | $<min>=['^'] <max=.integer> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment