fn single_or_double_char_token(
      &mut self,
      single: TokenKind,
      second: char,
      double: TokenKind,
   ) -> Token {
      self.advance();
      if self.get() == second {
         self.advance();
         self.token(double)
      } else {
         self.token(single)
      }
   }
/// Parses a token that's either one or two characters.
Parses a token that's either one or two characters.
Parses a token that ' s either one or two characters .
fn single_or_double_char_token(
      &mut self,
      single: TokenKind,
      second: char,
      double: TokenKind,
   ) -> Token {
      self.advance();
      if self.get() == second {
         self.advance();
         self.token(double)
      } else {
         self.token(single)
      }
   }
fn single_or_double_char_token ( & mut self , single : TokenKind , second : char , double : TokenKind , ) -> Token { self . advance ( ) ; if self . get ( ) == second { self . advance ( ) ; self . token ( double ) } else { self . token ( single ) } }
Parses a token that's either one or two characters.
Parses a token that ' s either one or two characters .
&mut self
single
TokenKind
second
char
double
TokenKind