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

Function token

cranelift/reader/src/lexer.rs:70–75  ·  view source on GitHub ↗

Wrap up a `Token` with the given location.

(token: Token, loc: Location)

Source from the content-addressed store, hash-verified

68
69/// Wrap up a `Token` with the given location.
70fn token(token: Token, loc: Location) -> Result<LocatedToken, LocatedError> {
71 Ok(LocatedToken {
72 token,
73 location: loc,
74 })
75}
76
77/// An error from the lexical analysis.
78#[derive(Debug, Clone, Copy, PartialEq, Eq)]

Callers 10

scan_charMethod · 0.85
scan_charsMethod · 0.85
scan_commentMethod · 0.85
scan_numberMethod · 0.85
scan_wordMethod · 0.85
scan_nameMethod · 0.85
scan_stringMethod · 0.85
scan_hex_sequenceMethod · 0.85
scan_srclocMethod · 0.85
nextMethod · 0.85

Calls 1

OkFunction · 0.85

Tested by

no test coverage detected