Check whether `offset` falls inside any nested frame (closure, arrow function, or catch) within the given parent frame.
(
offset: u32,
parent: &crate::scope_collector::Frame,
frames: &[crate::scope_collector::Frame],
)
| 467 | /// Check whether `offset` falls inside any nested frame (closure, |
| 468 | /// arrow function, or catch) within the given parent frame. |
| 469 | fn is_in_nested_frame( |
| 470 | offset: u32, |
| 471 | parent: &crate::scope_collector::Frame, |
| 472 | frames: &[crate::scope_collector::Frame], |
| 473 | ) -> bool { |
| 474 | frames.iter().any(|f| { |
| 475 | f.start > parent.start && f.end < parent.end && offset >= f.start && offset <= f.end |
| 476 | }) |
| 477 | } |
| 478 | |
| 479 | /// Check whether a write access at `offset` for variable `name` is |
| 480 | /// actually a parameter declaration of a nested closure or arrow |