Permalink
Browse files

Catch use of \N{NAME}

  • Loading branch information...
1 parent 2504c1a commit ea24a2907dc4b5c696dccc0c47ea13512ac12457 @TimToady TimToady committed Jun 5, 2013
Showing with 9 additions and 1 deletion.
  1. +9 −1 STD.pm6
View
10 STD.pm6
@@ -4285,6 +4285,10 @@ grammar Q is STD {
token backslash:e { <sym> }
token backslash:f { <sym> }
token backslash:n { <sym> }
+ token backslash:N {
+ <sym>
+ [ <?before '{'> <.worryobs('\N{...}', '\c[...]')> ]?
+ }
token backslash:o { :dba('octal character') <sym> [ <octint> | '[' ~ ']' <octints> ] }
token backslash:r { <sym> }
token backslash:t { <sym> }
@@ -5116,7 +5120,11 @@ grammar Regex is STD {
token backslash:e { :i <sym> <.SIGOK> }
token backslash:f { :i <sym> <.SIGOK> }
token backslash:h { :i <sym> <.SIGOK> }
- token backslash:n { :i <sym> <.SIGOK> }
+ token backslash:n { <sym> <.SIGOK> }
+ token backslash:N {
+ <sym> <.SIGOK>
+ [ <?before '{'> <.worryobs('\N{...}', '\c[...], or disambiguate with whitespace')> ]?
+ }
token backslash:o { :i :dba('octal character') <sym> [ <octint> | '[' ~ ']' <octints> ] <.SIGOK> }
token backslash:p {
:my $s;

0 comments on commit ea24a29

Please sign in to comment.