fn extended_literal(&mut self) -> Result<Token, Error> {
      self.advance(); // Skip backslash
      match self.get() {
         'r' => {
            self.advance();
            let content = self.string(true)?;
            Ok(self.token(TokenKind::String(Rc::from(content))))
         }
         'u' => {
            self.advance();
            let c = self.character()? as u32 as f64;
            Ok(self.token(TokenKind::Number(c)))
         }
         '\\' => {
            self.advance();
            let content = self.long_string();
            Ok(self.token(TokenKind::LongString(Rc::from(content))))
         }
         '0'..='9' => {
            let number = self.integer_with_explicit_radix()? as f64;
            Ok(self.token(TokenKind::Number(number)))
         }
         'b' | 'B' => self.integer_with_constant_radix(2),
         // NOTE: Do not request an uppercase O, this is intentional so as to prevent confusion
         // between 0 and O.
         'o' => self.integer_with_constant_radix(8),
         'x' | 'X' => self.integer_with_constant_radix(16),
         other => Err(self.error(ErrorKind::InvalidBackslashLiteral(other))),
      }
   }
/// Parses an extended (or "backslash") literal, that is, a literal that begins with a backslash,
/// is discriminated by a single character following the backslash, and continues onward.
Parses an extended (or "backslash") literal, that is, a literal that begins with a backslash,
is discriminated by a single character following the backslash, and continues onward.
Parses an extended ( or " backslash " ) literal that is a literal that begins with a backslash is discriminated by a single character following the backslash and continues onward .
fn extended_literal(&mut self) -> Result<Token, Error> {
      self.advance(); // Skip backslash
      match self.get() {
         'r' => {
            self.advance();
            let content = self.string(true)?;
            Ok(self.token(TokenKind::String(Rc::from(content))))
         }
         'u' => {
            self.advance();
            let c = self.character()? as u32 as f64;
            Ok(self.token(TokenKind::Number(c)))
         }
         '\\' => {
            self.advance();
            let content = self.long_string();
            Ok(self.token(TokenKind::LongString(Rc::from(content))))
         }
         '0'..='9' => {
            let number = self.integer_with_explicit_radix()? as f64;
            Ok(self.token(TokenKind::Number(number)))
         }
         'b' | 'B' => self.integer_with_constant_radix(2),
         // NOTE: Do not request an uppercase O, this is intentional so as to prevent confusion
         // between 0 and O.
         'o' => self.integer_with_constant_radix(8),
         'x' | 'X' => self.integer_with_constant_radix(16),
         other => Err(self.error(ErrorKind::InvalidBackslashLiteral(other))),
      }
   }
fn extended_literal ( & mut self ) -> Result < Token , Error > { self . advance ( ) ; // Skip backslash match self . get ( ) { 'r' => { self . advance ( ) ; let content = self . string ( true ) ? ; Ok ( self . token ( TokenKind :: String ( Rc :: from ( content ) ) ) ) } 'u' => { self . advance ( ) ; let c = self . character ( ) ? as u32 as f64 ; Ok ( self . token ( TokenKind :: Number ( c ) ) ) } '\\' => { self . advance ( ) ; let content = self . long_string ( ) ; Ok ( self . token ( TokenKind :: LongString ( Rc :: from ( content ) ) ) ) } '0' ..= '9' => { let number = self . integer_with_explicit_radix ( ) ? as f64 ; Ok ( self . token ( TokenKind :: Number ( number ) ) ) } 'b' | 'B' => self . integer_with_constant_radix ( 2 ) , // NOTE: Do not request an uppercase O, this is intentional so as to prevent confusion // between 0 and O. 'o' => self . integer_with_constant_radix ( 8 ) , 'x' | 'X' => self . integer_with_constant_radix ( 16 ) , other => Err ( self . error ( ErrorKind :: InvalidBackslashLiteral ( other ) ) ) , } }
Parses an extended (or "backslash") literal, that is, a literal that begins with a backslash,
is discriminated by a single character following the backslash, and continues onward.
Parses an extended ( or " backslash " ) literal that is a literal that begins with a backslash is discriminated by a single character following the backslash and continues onward .
&mut self