File tree Expand file tree Collapse file tree 2 files changed +7
-21
lines changed
Expand file tree Collapse file tree 2 files changed +7
-21
lines changed Original file line number Diff line number Diff line change @@ -722,28 +722,12 @@ fn backslash_u<I>(chars: &mut I) -> bool
722722{
723723 next_ch ! ( chars @ '{' ) ;
724724 next_ch ! ( chars @ '0' ...'9' | 'a' ...'f' | 'A' ...'F' ) ;
725- let b = next_ch ! ( chars @ '0' ...'9' | 'a' ...'f' | 'A' ...'F' | '}' ) ;
726- if b == '}' {
727- return true
728- }
729- let c = next_ch ! ( chars @ '0' ...'9' | 'a' ...'f' | 'A' ...'F' | '}' ) ;
730- if c == '}' {
731- return true
732- }
733- let d = next_ch ! ( chars @ '0' ...'9' | 'a' ...'f' | 'A' ...'F' | '}' ) ;
734- if d == '}' {
735- return true
736- }
737- let e = next_ch ! ( chars @ '0' ...'9' | 'a' ...'f' | 'A' ...'F' | '}' ) ;
738- if e == '}' {
739- return true
740- }
741- let f = next_ch ! ( chars @ '0' ...'9' | 'a' ...'f' | 'A' ...'F' | '}' ) ;
742- if f == '}' {
743- return true
725+ loop {
726+ let c = next_ch ! ( chars @ '0' ...'9' | 'a' ...'f' | 'A' ...'F' | '_' | '}' ) ;
727+ if c == '}' {
728+ return true ;
729+ }
744730 }
745- next_ch ! ( chars @ '}' ) ;
746- true
747731}
748732
749733fn float ( input : & str ) -> PResult < ( ) > {
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ fn roundtrip() {
4747 " ) ;
4848 roundtrip ( "'a" ) ;
4949 roundtrip ( "'static" ) ;
50+ roundtrip ( "'\\ u{10__FFFF}'" ) ;
51+ roundtrip ( "\" \\ u{10_F0FF__}foo\\ u{1_0_0_0__}\" " ) ;
5052}
5153
5254#[ test]
You can’t perform that action at this time.
0 commit comments