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

Method parse_function_list

cranelift/reader/src/parser.rs:1202–1213  ·  view source on GitHub ↗

Parse a list of function definitions. This is the top-level parse function matching the whole contents of a file.

(&mut self)

Source from the content-addressed store, hash-verified

1200 ///
1201 /// This is the top-level parse function matching the whole contents of a file.
1202 pub fn parse_function_list(&mut self) -> ParseResult<Vec<(Function, Details<'a>)>> {
1203 let mut list = Vec::new();
1204 while self.token().is_some() {
1205 list.push(self.parse_function()?);
1206 }
1207 if let Some(err) = self.lex_error {
1208 return match err {
1209 LexError::InvalidChar => err!(self.loc, "invalid character"),
1210 };
1211 }
1212 Ok(list)
1213 }
1214
1215 // Parse a whole function definition.
1216 //

Callers 1

parse_testFunction · 0.80

Calls 6

OkFunction · 0.85
tokenMethod · 0.80
parse_functionMethod · 0.80
newFunction · 0.50
is_someMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected