(&mut self)
| 435 | } |
| 436 | |
| 437 | fn scan_hex_sequence(&mut self) -> Result<LocatedToken<'a>, LocatedError> { |
| 438 | let loc = self.loc(); |
| 439 | let begin = self.pos + 1; |
| 440 | |
| 441 | assert_eq!(self.lookahead, Some('#')); |
| 442 | |
| 443 | while let Some(c) = self.next_ch() { |
| 444 | if !char::is_digit(c, 16) { |
| 445 | break; |
| 446 | } |
| 447 | } |
| 448 | |
| 449 | let end = self.pos; |
| 450 | token(Token::HexSequence(&self.source[begin..end]), loc) |
| 451 | } |
| 452 | |
| 453 | /// Given that we've consumed an `@` character, are we looking at a source |
| 454 | /// location? |