Skip to content

Commit cc3918c

Browse files
committed
Turns out that fixing the negation of literals renders the backlit stuff unrequired; remove it.
1 parent 98ef1a1 commit cc3918c

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

src/QRegex/P6Regex/Actions.nqp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,6 @@ class QRegex::P6Regex::Actions is HLL::Actions {
304304
my $qast := QAST::Regex.new( ~$/ , :rxtype('literal'), :node($/) );
305305
make $qast;
306306
}
307-
308-
method backlit($/) {
309-
my $qast := QAST::Regex.new( ~$/, :rxtype('enumcharlist'),
310-
:node($/) );
311-
make $qast;
312-
}
313307

314308
method assertion:sym<?>($/) {
315309
my $qast;
@@ -423,11 +417,6 @@ class QRegex::P6Regex::Actions is HLL::Actions {
423417
$bs.negate(!$bs.negate) if $<sign> eq '-';
424418
@alts.push($bs);
425419
}
426-
elsif $_<backlit> {
427-
my $bslit := $_<backlit>.ast;
428-
$bslit.negate(!$bslit.negate) if $<sign> eq '-';
429-
@alts.push($bslit);
430-
}
431420
elsif $_[1] {
432421
my $ord0 := nqp::ord($_[0]);
433422
my $ord1 := nqp::ord($_[1][0]);

src/QRegex/P6Regex/Grammar.nqp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,12 @@ grammar QRegex::P6Regex::Grammar is HLL::Grammar {
195195

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

198-
token backlit { '\\' | '-' }
199-
200198
token cclass_elem {
201199
$<sign>=['+'|'-'|<?>]
202200
<.normspace>?
203201
[
204202
| '[' $<charspec>=(
205203
|| \s* '-' <!before \s* ']'> <.obs: '- as character range','.. for range, for explicit - in character class, escape it or place as last thing'>
206-
|| \s* '\\' <backlit>
207204
|| \s* '\\' <backslash>
208205
|| \s* (<-[\]\\]>) [ \s* '..' \s* (.) ]?
209206
)*

0 commit comments

Comments
 (0)