TermiNexus
a2829182b8
feat(imports): 支持模块级 cif 条件 import
- ImportsGenMixin 新增 translate_cif_imports / _collect_cif_imports_in:
用 cif 求值只收集选中分支的 Import/ImportFrom,celif 的 orelse 递归求值,
celse 按普通语句收集;普通模块级 if 原样忽略
- Translator._translate_module_level 的 import 预扫描新增 If 分支(mode 0)
- TranslatorGenMixin.translate_children 在 declare/import-scan 模式补收集(mode != 0),
避免与预扫描重复写入 from_imports
- GenApi 增加 translate_cif_imports 转发
未选中分支的模块不进入依赖闭包,因此不会被编译/链接,
可用于在平台专有模块之间二选一(如 win32.fileio / posix.fileio)。
2026-10-25 12:28:29 +08:00
..
2026-10-24 23:57:09 +08:00
2026-10-25 12:28:29 +08:00
2026-10-05 13:38:22 +08:00
2026-10-17 23:40:06 +08:00
2026-10-17 23:40:06 +08:00
2026-10-17 23:40:06 +08:00
2026-10-15 18:35:48 +08:00
2026-10-17 23:40:06 +08:00