We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec3d853 commit 77c9884Copy full SHA for 77c9884
STD.pm6
@@ -5249,6 +5249,21 @@ grammar Regex is STD {
5249
:dba('character class element')
5250
"[" ~ "]" <nibble($¢.cursor_fresh( %*LANG<Q> ).tweak(:cc).unbalanced("]"))>
5251
<.normspace>?
5252
+ {
5253
+ $_ = $<nibble>.Str;
5254
+ 1 while s/\s+|\.\.|\\//;
5255
+
5256
+ # XXX emulate /(.) .*? $0/ which viv flubs
5257
+ my %seen;
5258
+ for unpack('C*', $_) {
5259
+ %seen{$_}++;
5260
+ }
5261
+ for keys %seen {
5262
+ next if %seen{$_} < 2;
5263
+ my $c = chr($_);
5264
+ $¢.worry("Repeated character ($c) unexpectedly found in character class");
5265
5266
5267
}
5268
5269
token cclass_elem:sym<( )> {
0 commit comments