Skip to main content

Module rule

Module rule 

Source
Expand description

Rule trait and metadata for the rewrite phase.

Every transform rule implements RewriteRule and carries a static RuleMeta descriptor that the engine uses for scheduling, dependency analysis, and convergence checking.

Rules are organized along three axes:

  • Package (PackageName) — the owning package namespace (base, ams, physics).
  • Normalization level (NormalizationLevel) — the first transform profile that accepts the rule output as a suitable product.
  • Fidelity (RuleFidelity) — the rule’s worst-case render-fidelity guarantee over its declared input domain.

Structs§

RuleConsumes
Declares the commands, environments, or characters that a rule removes from, reads, or may otherwise touch in the AST.
RuleKey
Unique identifier for a rule, composed of its package and a human-readable name.
RuleMeta
Static metadata bundle that fully describes a rule’s identity, scheduling, and dependency contract.
RuleProduces
Declares the new forms that a rule may introduce into the AST.
RuleTargetKey

Enums§

NormalizationLevel
PackageName
RuleEffect
Result of attempting to apply a rule to a single node.
RuleFidelity
How faithfully a rewrite preserves the input when re-rendered.
RuleTarget
A specific command, environment, or character that a rule operates on, references, or produces.
RuleTargetKind

Traits§

RewriteRule
The central trait that all rewrite rules implement.