Skip to main content

Module rules

Module rules 

Source
Expand description

Builtin rewrite rule registry (auto-generated).

This file includes the registry generated by build.rs, which automatically discovers every .rs file in this directory tree (except mod.rs and generated.rs) and registers its rule constant into the generated registry.

Convention: each rule file must declare exactly one pub static UPPER_SNAKE: SomeRuleType where UPPER_SNAKE is the UPPER_SNAKE_CASE form of the file name (e.g., over_to_frac.rs exports OVER_TO_FRAC). No manual registration is needed — just add a new file under rewrite/rules/ using the documented module naming conventions and the build script picks it up.