Skip to content

Commit

Permalink
feat: more
Browse files Browse the repository at this point in the history
  • Loading branch information
fzyzcjy committed Jun 5, 2024
1 parent 214e7ca commit 67e6062
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
use crate::codegen::ir::hir::flat::pack::HirFlatPack;
use crate::codegen::ir::hir::tree::module::HirTreeModuleMeta;
use crate::utils::crate_name::CrateName;

pub(crate) fn transform(mut pack: HirFlatPack) -> anyhow::Result<HirFlatPack> {
TODO;
Ok(pack)
}

fn is_interest_mod(meta: &HirTreeModuleMeta) -> bool {
// If it is third party crate, then we only scan the `pub` mods,
// since for non-pub modes, it is impossible to use them even if we scanned them.
meta.namespace.path()[0] == CrateName::SELF_CRATE || meta.is_public()
}
5 changes: 0 additions & 5 deletions frb_codegen/src/library/codegen/parser/hir/flat_old/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,3 @@ where
ans
}

fn is_interest_mod(module: &HirModule) -> bool {
// If it is third party crate, then we only scan the `pub` mods,
// since for non-pub modes, it is impossible to use them even if we scanned them.
module.meta.namespace.path()[0] == CrateName::SELF_CRATE || module.meta.is_public()
}

0 comments on commit 67e6062

Please sign in to comment.