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)
657657 if popfirst! (a) == ' \\ '
658658 c = popfirst! (a)
659659 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
661661 0 < length (a) <= maxiter || return false
662662 n = 0
663663 while ! isempty (a)
Original file line number Diff line number Diff line change @@ -994,6 +994,7 @@ end""" |> test_expr
994994 @test test_expr (raw " '\u 2222'" )
995995 @test test_expr (raw " '\U 2222'" )
996996 @test test_expr (raw " '\U 22222'" )
997+ @test test_expr (raw " '\U 00000001'" )
997998
998999 @test CSTParser. parse (raw " '\2 00'" ). head == :errortoken
9991000 @test CSTParser. parse (raw " '\3 00'" ). head == :errortoken
@@ -1009,6 +1010,7 @@ end""" |> test_expr
10091010 @test CSTParser. parse (raw " '\u 222ää'" ). head == :errortoken
10101011 @test CSTParser. parse (raw " '\x 222ää'" ). head == :errortoken
10111012 @test CSTParser. parse (raw " '\U 222ää'" ). head == :errortoken
1013+ @test CSTParser. parse (raw " '\U 10000001'" ). head == :errortoken
10121014 for c in rand (Char, 1000 )
10131015 @test test_expr (string (" '" , c, " '" ))
10141016 end
You can’t perform that action at this time.
0 commit comments