Method
scan_srcloc
(&mut self, pos: usize, loc: Location)
Source from the content-addressed store, hash-verified
| 460 | } |
| 461 | |
| 462 | fn scan_srcloc(&mut self, pos: usize, loc: Location) -> Result<LocatedToken<'a>, LocatedError> { |
| 463 | let begin = pos + 1; |
| 464 | while let Some(c) = self.next_ch() { |
| 465 | if !char::is_digit(c, 16) { |
| 466 | break; |
| 467 | } |
| 468 | } |
| 469 | |
| 470 | let end = self.pos; |
| 471 | token(Token::SourceLoc(&self.source[begin..end]), loc) |
| 472 | } |
| 473 | |
| 474 | /// Get the next token or a lexical error. |
| 475 | /// |
Tested by
no test coverage detected