File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -657,7 +657,7 @@ function valid_escaped_seq(s::AbstractString)
657
657
if popfirst! (a) == ' \\ '
658
658
c = popfirst! (a)
659
659
if c === ' x' || c === ' u' || c === ' U'
660
- maxiter = c === ' x' ? 2 : c === ' u' ? 4 : 5
660
+ maxiter = c === ' x' ? 2 : c === ' u' ? 4 : 8
661
661
0 < length (a) <= maxiter || return false
662
662
n = 0
663
663
while ! isempty (a)
Original file line number Diff line number Diff line change @@ -994,6 +994,7 @@ end""" |> test_expr
994
994
@test test_expr (raw " '\u 2222'" )
995
995
@test test_expr (raw " '\U 2222'" )
996
996
@test test_expr (raw " '\U 22222'" )
997
+ @test test_expr (raw " '\U 00000001'" )
997
998
998
999
@test CSTParser. parse (raw " '\2 00'" ). head == :errortoken
999
1000
@test CSTParser. parse (raw " '\3 00'" ). head == :errortoken
@@ -1009,6 +1010,7 @@ end""" |> test_expr
1009
1010
@test CSTParser. parse (raw " '\u 222ää'" ). head == :errortoken
1010
1011
@test CSTParser. parse (raw " '\x 222ää'" ). head == :errortoken
1011
1012
@test CSTParser. parse (raw " '\U 222ää'" ). head == :errortoken
1013
+ @test CSTParser. parse (raw " '\U 10000001'" ). head == :errortoken
1012
1014
for c in rand (Char, 1000 )
1013
1015
@test test_expr (string (" '" , c, " '" ))
1014
1016
end
You can’t perform that action at this time.
0 commit comments