mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 02:31:13 +08:00
style: 自动格式化
This commit is contained in:
@@ -37,11 +37,8 @@ impl<'a> CaptureEngine<'a> {
|
||||
/// `sub_own` 为 upvalue 显式排除集,`captured_out` 与 `upvalue_out` 为双输出
|
||||
/// 累加器。shadow 初始空,depth 初始 0。
|
||||
pub(crate) fn new(
|
||||
own: &'a HashSet<String>,
|
||||
parent_names: &'a HashSet<String>,
|
||||
sub_own: &'a HashSet<String>,
|
||||
captured_out: &'a mut HashSet<String>,
|
||||
upvalue_out: &'a mut HashSet<String>,
|
||||
own: &'a HashSet<String>, parent_names: &'a HashSet<String>, sub_own: &'a HashSet<String>,
|
||||
captured_out: &'a mut HashSet<String>, upvalue_out: &'a mut HashSet<String>,
|
||||
) -> Self {
|
||||
CaptureEngine {
|
||||
own,
|
||||
|
||||
@@ -15,12 +15,8 @@ use super::scanner::{collect_capture_names_expr, collect_capture_names_shadowed,
|
||||
/// `parent_captured` 与 `parent_upvalues` 为父层两映射(构建全深度引用集),
|
||||
/// `sub_own` 为 upvalue 判定的显式排除集。
|
||||
pub(crate) fn collect_captures_and_upvalues(
|
||||
body_stmts: &[Statement],
|
||||
extra_exprs: &[&Expression],
|
||||
own: &HashSet<String>,
|
||||
parent_captured: &BTreeMap<String, u8>,
|
||||
parent_upvalues: &[UpvalueCapture],
|
||||
sub_own: &HashSet<String>,
|
||||
body_stmts: &[Statement], extra_exprs: &[&Expression], own: &HashSet<String>,
|
||||
parent_captured: &BTreeMap<String, u8>, parent_upvalues: &[UpvalueCapture], sub_own: &HashSet<String>,
|
||||
) -> (BTreeMap<String, u8>, Vec<UpvalueCapture>) {
|
||||
// 构建全深度引用集:父捕获名 ∪ 父 upvalue 名。
|
||||
let mut parent_names: HashSet<String> = parent_captured.keys().cloned().collect();
|
||||
|
||||
Reference in New Issue
Block a user