Skip to content

Commit 27326bc

Browse files
committed
allow _ in regex ** range integers
1 parent 83f92a5 commit 27326bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

STD.pm6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5291,8 +5291,8 @@ grammar Regex is STD {
52915291
token quantifier:sym<:> { <sym> {} <?before \s> }
52925292
token quantifier:sym<**> { '**' :: <normspace>? <quantmod> <normspace>?
52935293
[
5294-
| \d+ \s+ '..' <.panic: "Spaces not allowed in bare range">
5295-
| (\d+) [ '..' [ (\d+) {.panic("Empty range") if $0.Str > $1[0].Str } | '*' | <.panic: "Malformed range"> ] ]?
5294+
| <.decint> \s+ '..' <.panic: "Spaces not allowed in bare range">
5295+
| (<.decint>) [ '..' [ (<.decint>) {.panic("Empty range") if $0.Str > $1[0].Str } | '*' | <.panic: "Malformed range"> ] ]?
52965296
| <embeddedblock>
52975297
| {} <quantified_atom> {.worryobs("atom ** " ~ $<quantified_atom>.Str ~ " as separator", "atom +% " ~ $<quantified_atom>.Str, " nowadays"); }
52985298
]

0 commit comments

Comments
 (0)