Lex the next token.
(&mut self)
| 144 | |
| 145 | /// Lex the next token. |
| 146 | pub fn next_token(&mut self) -> TokenKind { |
| 147 | self.cursor.start_token(); |
| 148 | self.current_value = TokenValue::None; |
| 149 | self.current_flags = TokenFlags::empty(); |
| 150 | self.current_kind = self.lex_token(); |
| 151 | // For `Unknown` token, the `push_error` method updates the current range. |
| 152 | if !matches!(self.current_kind, TokenKind::Unknown) { |
| 153 | self.current_range = self.token_range(); |
| 154 | } |
| 155 | self.current_kind |
| 156 | } |
| 157 | |
| 158 | fn lex_token(&mut self) -> TokenKind { |
| 159 | if let Some(fstring) = self.fstrings.current() { |
no test coverage detected