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

Method scan_chars

cranelift/reader/src/lexer.rs:214–225  ·  view source on GitHub ↗

Scan a multi-char token.

(
        &mut self,
        count: usize,
        tok: Token<'a>,
    )

Source from the content-addressed store, hash-verified

212
213 // Scan a multi-char token.
214 fn scan_chars(
215 &mut self,
216 count: usize,
217 tok: Token<'a>,
218 ) -> Result<LocatedToken<'a>, LocatedError> {
219 let loc = self.loc();
220 for _ in 0..count {
221 assert_ne!(self.lookahead, None);
222 self.next_ch();
223 }
224 token(tok, loc)
225 }
226
227 /// Get the rest of the current line.
228 /// The next token returned by `next()` will be from the following lines.

Callers 1

nextMethod · 0.80

Calls 3

tokenFunction · 0.85
locMethod · 0.80
next_chMethod · 0.80

Tested by

no test coverage detected