@@ -400,7 +400,7 @@ impl<'sess, 'src> StringReader<'sess, 'src> {
400400 . with_code ( error_code ! ( E0762 ) )
401401 . emit ( )
402402 }
403- self . cook_quoted ( token:: Char , Mode :: Char , start, end, 1 , 1 ) // ' '
403+ self . cook_unicode ( token:: Char , Mode :: Char , start, end, 1 , 1 ) // ' '
404404 }
405405 rustc_lexer:: LiteralKind :: Byte { terminated } => {
406406 if !terminated {
@@ -412,7 +412,7 @@ impl<'sess, 'src> StringReader<'sess, 'src> {
412412 . with_code ( error_code ! ( E0763 ) )
413413 . emit ( )
414414 }
415- self . cook_quoted ( token:: Byte , Mode :: Byte , start, end, 2 , 1 ) // b' '
415+ self . cook_unicode ( token:: Byte , Mode :: Byte , start, end, 2 , 1 ) // b' '
416416 }
417417 rustc_lexer:: LiteralKind :: Str { terminated } => {
418418 if !terminated {
@@ -424,7 +424,7 @@ impl<'sess, 'src> StringReader<'sess, 'src> {
424424 . with_code ( error_code ! ( E0765 ) )
425425 . emit ( )
426426 }
427- self . cook_quoted ( token:: Str , Mode :: Str , start, end, 1 , 1 ) // " "
427+ self . cook_unicode ( token:: Str , Mode :: Str , start, end, 1 , 1 ) // " "
428428 }
429429 rustc_lexer:: LiteralKind :: ByteStr { terminated } => {
430430 if !terminated {
@@ -436,7 +436,7 @@ impl<'sess, 'src> StringReader<'sess, 'src> {
436436 . with_code ( error_code ! ( E0766 ) )
437437 . emit ( )
438438 }
439- self . cook_quoted ( token:: ByteStr , Mode :: ByteStr , start, end, 2 , 1 ) // b" "
439+ self . cook_unicode ( token:: ByteStr , Mode :: ByteStr , start, end, 2 , 1 ) // b" "
440440 }
441441 rustc_lexer:: LiteralKind :: CStr { terminated } => {
442442 if !terminated {
@@ -448,13 +448,13 @@ impl<'sess, 'src> StringReader<'sess, 'src> {
448448 . with_code ( error_code ! ( E0767 ) )
449449 . emit ( )
450450 }
451- self . cook_c_string ( token:: CStr , Mode :: CStr , start, end, 2 , 1 ) // c" "
451+ self . cook_mixed ( token:: CStr , Mode :: CStr , start, end, 2 , 1 ) // c" "
452452 }
453453 rustc_lexer:: LiteralKind :: RawStr { n_hashes } => {
454454 if let Some ( n_hashes) = n_hashes {
455455 let n = u32:: from ( n_hashes) ;
456456 let kind = token:: StrRaw ( n_hashes) ;
457- self . cook_quoted ( kind, Mode :: RawStr , start, end, 2 + n, 1 + n) // r##" "##
457+ self . cook_unicode ( kind, Mode :: RawStr , start, end, 2 + n, 1 + n) // r##" "##
458458 } else {
459459 self . report_raw_str_error ( start, 1 ) ;
460460 }
@@ -463,7 +463,7 @@ impl<'sess, 'src> StringReader<'sess, 'src> {
463463 if let Some ( n_hashes) = n_hashes {
464464 let n = u32:: from ( n_hashes) ;
465465 let kind = token:: ByteStrRaw ( n_hashes) ;
466- self . cook_quoted ( kind, Mode :: RawByteStr , start, end, 3 + n, 1 + n) // br##" "##
466+ self . cook_unicode ( kind, Mode :: RawByteStr , start, end, 3 + n, 1 + n) // br##" "##
467467 } else {
468468 self . report_raw_str_error ( start, 2 ) ;
469469 }
@@ -472,7 +472,7 @@ impl<'sess, 'src> StringReader<'sess, 'src> {
472472 if let Some ( n_hashes) = n_hashes {
473473 let n = u32:: from ( n_hashes) ;
474474 let kind = token:: CStrRaw ( n_hashes) ;
475- self . cook_c_string ( kind, Mode :: RawCStr , start, end, 3 + n, 1 + n) // cr##" "##
475+ self . cook_mixed ( kind, Mode :: RawCStr , start, end, 3 + n, 1 + n) // cr##" "##
476476 } else {
477477 self . report_raw_str_error ( start, 2 ) ;
478478 }
@@ -735,7 +735,7 @@ impl<'sess, 'src> StringReader<'sess, 'src> {
735735 }
736736 }
737737
738- fn cook_quoted (
738+ fn cook_unicode (
739739 & self ,
740740 kind : token:: LitKind ,
741741 mode : Mode ,
@@ -745,13 +745,13 @@ impl<'sess, 'src> StringReader<'sess, 'src> {
745745 postfix_len : u32 ,
746746 ) -> ( token:: LitKind , Symbol ) {
747747 self . cook_common ( kind, mode, start, end, prefix_len, postfix_len, |src, mode, callback| {
748- unescape:: unescape_literal ( src, mode, & mut |span, result| {
748+ unescape:: unescape_unicode ( src, mode, & mut |span, result| {
749749 callback ( span, result. map ( drop) )
750750 } )
751751 } )
752752 }
753753
754- fn cook_c_string (
754+ fn cook_mixed (
755755 & self ,
756756 kind : token:: LitKind ,
757757 mode : Mode ,
@@ -761,7 +761,7 @@ impl<'sess, 'src> StringReader<'sess, 'src> {
761761 postfix_len : u32 ,
762762 ) -> ( token:: LitKind , Symbol ) {
763763 self . cook_common ( kind, mode, start, end, prefix_len, postfix_len, |src, mode, callback| {
764- unescape:: unescape_c_string ( src, mode, & mut |span, result| {
764+ unescape:: unescape_mixed ( src, mode, & mut |span, result| {
765765 callback ( span, result. map ( drop) )
766766 } )
767767 } )
0 commit comments