MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / scan_srcloc

Method scan_srcloc

cranelift/reader/src/lexer.rs:462–472  ·  view source on GitHub ↗
(&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 ///

Callers 1

nextMethod · 0.80

Calls 3

tokenFunction · 0.85
SourceLocClass · 0.85
next_chMethod · 0.80

Tested by

no test coverage detected