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

Method scan_name

cranelift/reader/src/lexer.rs:399–414  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

397 }
398
399 fn scan_name(&mut self) -> Result<LocatedToken<'a>, LocatedError> {
400 let loc = self.loc();
401 let begin = self.pos + 1;
402
403 assert_eq!(self.lookahead, Some('%'));
404
405 loop {
406 match self.next_ch() {
407 Some('_') | Some('0'..='9') | Some('a'..='z') | Some('A'..='Z') => {}
408 _ => break,
409 }
410 }
411
412 let end = self.pos;
413 token(Token::Name(&self.source[begin..end]), loc)
414 }
415
416 /// Scan for a multi-line quoted string with no escape character.
417 fn scan_string(&mut self) -> Result<LocatedToken<'a>, LocatedError> {

Callers 1

nextMethod · 0.80

Calls 4

tokenFunction · 0.85
NameClass · 0.85
locMethod · 0.80
next_chMethod · 0.80

Tested by

no test coverage detected