Skip to content

Commit ea24a29

Browse files
committed
Catch use of \N{NAME}
1 parent 2504c1a commit ea24a29

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

STD.pm6

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4285,6 +4285,10 @@ grammar Q is STD {
42854285
token backslash:e { <sym> }
42864286
token backslash:f { <sym> }
42874287
token backslash:n { <sym> }
4288+
token backslash:N {
4289+
<sym>
4290+
[ <?before '{'> <.worryobs('\N{...}', '\c[...]')> ]?
4291+
}
42884292
token backslash:o { :dba('octal character') <sym> [ <octint> | '[' ~ ']' <octints> ] }
42894293
token backslash:r { <sym> }
42904294
token backslash:t { <sym> }
@@ -5116,7 +5120,11 @@ grammar Regex is STD {
51165120
token backslash:e { :i <sym> <.SIGOK> }
51175121
token backslash:f { :i <sym> <.SIGOK> }
51185122
token backslash:h { :i <sym> <.SIGOK> }
5119-
token backslash:n { :i <sym> <.SIGOK> }
5123+
token backslash:n { <sym> <.SIGOK> }
5124+
token backslash:N {
5125+
<sym> <.SIGOK>
5126+
[ <?before '{'> <.worryobs('\N{...}', '\c[...], or disambiguate with whitespace')> ]?
5127+
}
51205128
token backslash:o { :i :dba('octal character') <sym> [ <octint> | '[' ~ ']' <octints> ] <.SIGOK> }
51215129
token backslash:p {
51225130
:my $s;

0 commit comments

Comments
 (0)