MCPcopy Create free account
hub / github.com/SeaQL/FireDBG.for.Rust / parse_nested_func

Function parse_nested_func

parser/src/parsing/function.rs:196–212  ·  view source on GitHub ↗
(parent_breakpoint: FunctionDef, block: &syn::Block)

Source from the content-addressed store, hash-verified

194}
195
196fn parse_nested_func(parent_breakpoint: FunctionDef, block: &syn::Block) -> Vec<FunctionDef> {
197 let mut nested_func = block.stmts.iter().fold(Vec::new(), |mut acc, stmt| {
198 match stmt {
199 syn::Stmt::Item(item) => {
200 acc.extend(item.parse().into_iter().map(|mut breakpoint| {
201 breakpoint.ty = breakpoint.ty.into_nested_func(&parent_breakpoint);
202 breakpoint
203 }));
204 }
205 _ => {}
206 }
207 acc
208 });
209 let mut breakpoints = vec![parent_breakpoint];
210 breakpoints.append(&mut nested_func);
211 breakpoints
212}

Callers 1

parseMethod · 0.85

Calls 3

parseMethod · 0.80
into_nested_funcMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected