Skip to main content

Module naming

Module naming 

Source
Expand description

命名归一与定向翻译(设计 §6)。唯一实现;core-node / core-py 仅透出。

Enums§

Style
目标命名风格(设计 §6.1)
Target
翻译目标:介质(物理库)/ 语言(代码,计算列跟随),见设计 §6.1

Constants§

ERR_NAME_CONFLICT
稳定错误前缀(Host 按前缀识别)。经 CoreError::classify(error.rs:46-54) 归入 CoreError::Other —— 本步无需改 error.rs。
RESERVED_KEYS
契约保留键(归一后的 token 串)。来源 = 字段 / 关系 / 计算列 层实际被消费的契约键:

Functions§

canonical
用户任意写法 → token 序列(全小写)。
detect_conflicts
一组逻辑名(同一命名空间)→ 冲突检测;命中即 Err(ERR_NAME_CONFLICT:),空 = 通过。
to_camel
token 序列 → camelCase(t1 + T2)
to_pascal
token 序列 → PascalCase(T1T2)
to_snake
token 序列 → snake_case(t1_t2)
translate
逻辑名 → 目标风格物理名(可逆:先 canonical 再按 style 重组)
translate_by_str
字符串版翻译(绑定入口):目标串非法 ⇒ Err(禁静默回落)