Convenience: collect scope from a full method or function AST node. Includes parameter declarations and the body.
(
params: &FunctionLikeParameterList<'a>,
body: &[Statement<'a>],
body_start: u32,
body_end: u32,
)
| 672 | /// |
| 673 | /// Includes parameter declarations and the body. |
| 674 | pub(crate) fn collect_function_scope<'a>( |
| 675 | params: &FunctionLikeParameterList<'a>, |
| 676 | body: &[Statement<'a>], |
| 677 | body_start: u32, |
| 678 | body_end: u32, |
| 679 | ) -> ScopeMap { |
| 680 | collect_function_scope_with_kind(params, body, body_start, body_end, FrameKind::Function) |
| 681 | } |
| 682 | |
| 683 | /// Like [`collect_function_scope`] but accepts an optional |
| 684 | /// [`ByRefResolver`] callback. |