Permalink
Browse files

Fix case being ignored on multi-character backslash escapes; we now p…

…ass S05-mass/named-chars.t
  • Loading branch information...
1 parent 794a876 commit 59989fe7488520ec293bb782dcac1e8946d27154 @sorear committed Dec 23, 2011
Showing with 15 additions and 0 deletions.
  1. +14 −0 src/niecza
  2. +1 −0 t/spectest.data
View
@@ -26,6 +26,20 @@ use STD;
# }
augment class NieczaActions {
+method post_backslash($/) {
+ # XXX confine $/ resetting
+ sub _isupper { $_ ~~ /^<[ A .. Z ]>/ }
+ sub _islower { $_ ~~ /^<[ a .. z ]>/ }
+ if $/.ast.^isa(CClass) {
+ make self.cclass_cc($/.ast);
+ }
+ if _isupper($/) && _islower($<sym>) {
+ if $/.ast.^isa(Str) {
+ make self.string_cc($/.ast);
+ }
+ make self.negate_cc($/.ast);
+ }
+}
}
# remove run_dispatch
View
@@ -212,6 +212,7 @@ S05-grammar/methods.t
S05-grammar/protoregex.t
S05-grammar/signatures.t
S05-interpolation/lexicals.t
+S05-mass/named-chars.t
S05-mass/recursive.t
S05-mass/rx.t
S05-mass/stdrules.t

0 comments on commit 59989fe

Please sign in to comment.