Permalink
Browse files

allow _ in regex ** range integers

  • Loading branch information...
1 parent 83f92a5 commit 27326bc097fae7308cd333ea80e8fbf5843ee18e @TimToady TimToady committed Aug 29, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 STD.pm6
View
@@ -5291,8 +5291,8 @@ grammar Regex is STD {
token quantifier:sym<:> { <sym> {} <?before \s> }
token quantifier:sym<**> { '**' :: <normspace>? <quantmod> <normspace>?
[
- | \d+ \s+ '..' <.panic: "Spaces not allowed in bare range">
- | (\d+) [ '..' [ (\d+) {.panic("Empty range") if $0.Str > $1[0].Str } | '*' | <.panic: "Malformed range"> ] ]?
+ | <.decint> \s+ '..' <.panic: "Spaces not allowed in bare range">
+ | (<.decint>) [ '..' [ (<.decint>) {.panic("Empty range") if $0.Str > $1[0].Str } | '*' | <.panic: "Malformed range"> ] ]?
| <embeddedblock>
| {} <quantified_atom> {.worryobs("atom ** " ~ $<quantified_atom>.Str ~ " as separator", "atom +% " ~ $<quantified_atom>.Str, " nowadays"); }
]

0 comments on commit 27326bc

Please sign in to comment.