Returns the next 2 characters as a string slice
(&mut self)
| 292 | |
| 293 | // Returns the next 2 characters as a string slice |
| 294 | fn next2(&mut self) -> &str { |
| 295 | let mut chars = self.source[self.current..].char_indices(); |
| 296 | match chars.nth(1) { |
| 297 | Some((end_offset, ch)) => { |
| 298 | let end = self.current + end_offset + ch.len_utf8(); |
| 299 | &self.source[self.current..end] |
| 300 | } |
| 301 | None => &self.source[self.current..], |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | // Skips whitespace and comments |
| 306 | fn skip_white_spaces(&mut self) { |
no test coverage detected