Skip to main content

Module rule

Module rule 

Source
Expand description

规则 trait 与编辑描述。

事务模型:check(只读 + 允许追加节点)产出 Edit 提案 → runner 计算成本降幅(必须 > 0)→ 原子应用。任何 edit 都必须严格降低成本, 这保证 fixed-point 收敛、杜绝 rewrite 振荡。

Structs§

RewriteCtx
规则上下文:语言 AST 的可变访问 + 当前扫描的父/序号信息。

Enums§

Edit
一次结构编辑提案。

Traits§

Rule
一条简化规则。