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

Method parse_const

cranelift/isle/isle/src/parser.rs:231–242  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

229 }
230
231 fn parse_const(&mut self) -> Result<Ident> {
232 let pos = self.pos();
233 let ident = self.parse_ident()?;
234 if let Some(s) = ident.0.strip_prefix('$') {
235 Ok(Ident(s.to_string(), ident.1))
236 } else {
237 Err(self.error(
238 pos,
239 "Not a constant identifier; must start with a '$'".to_string(),
240 ))
241 }
242 }
243
244 fn parse_pragma(&mut self) -> Result<Pragma> {
245 let ident = self.parse_ident()?;

Callers 3

parse_externMethod · 0.80
parse_patternMethod · 0.80
parse_exprMethod · 0.80

Calls 6

OkFunction · 0.85
IdentClass · 0.85
parse_identMethod · 0.80
posMethod · 0.45
to_stringMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected