Skip to content

Commit af28c73

Browse files
committed
allow escaped hyphens too
1 parent 93744c1 commit af28c73

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/QRegex/P6Regex/Actions.nqp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ class QRegex::P6Regex::Actions is HLL::Actions {
306306
}
307307

308308
method backlit($/) {
309-
my $qast := QAST::Regex.new( '\\', :rxtype('enumcharlist'),
309+
my $qast := QAST::Regex.new( ~$/, :rxtype('enumcharlist'),
310310
:node($/) );
311311
make $qast;
312312
}

src/QRegex/P6Regex/Grammar.nqp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ grammar QRegex::P6Regex::Grammar is HLL::Grammar {
195195

196196
token assertion:sym<[> { <?before '['|'+'|'-'> <cclass_elem>+ }
197197

198-
token backlit { '\\' }
198+
token backlit { '\\' | '-' }
199199

200200
token cclass_elem {
201201
$<sign>=['+'|'-'|<?>]

0 commit comments

Comments
 (0)