MCPcopy Create free account
hub / github.com/PLSysSec/wave / parse

Method parse

tools/fuzz-gen/src/specifications/untyped.rs:42–58  ·  view source on GitHub ↗
(input: syn::parse::ParseStream)

Source from the content-addressed store, hash-verified

40
41impl syn::parse::Parse for AnyFnItem {
42 fn parse(input: syn::parse::ParseStream) -> syn::Result<Self> {
43 use syn::parse::discouraged::Speculative;
44 let fork = input.fork();
45 let item_fn = fork.parse();
46 match item_fn {
47 Ok(res) => {
48 // We have an item Fn.
49 input.advance_to(&fork);
50 Ok(AnyFnItem::Fn(res))
51 }
52 Err(_) => {
53 // It is not a valid ItemFn.
54 let item_method = input.parse()?;
55 Ok(AnyFnItem::TraitMethod(item_method))
56 }
57 }
58 }
59}
60
61impl AnyFnItem {

Callers

nothing calls this directly

Calls 4

extract_assertionMethod · 0.80
assign_idMethod · 0.80
extract_pledgeMethod · 0.80

Tested by

no test coverage detected