Expand description
AST rewrite phase: scheduling, rule application, and eliminated-form checks.
Re-exports§
pub use level_set::NormalizationLevelSet;pub use plan::Plan;pub use plan::PlanBuildError;pub use plan::RuleAvailabilityFailure;pub use rule::NormalizationLevel;pub use rule::RewriteRule;pub use rule::RuleConsumes;pub use rule::RuleEffect;pub use rule::RuleFidelity;pub use rule::RuleKey;pub use rule::RuleMeta;pub use rule::RuleProduces;pub use rule::RuleTarget;pub use rule::RuleTargetKey;pub use rule::RuleTargetKind;pub use rule_context::CommandView;pub use rule_context::DeclarativeView;pub use rule_context::EnvironmentView;pub use rule_context::InfixView;pub use rule_context::RuleContext;
Modules§
- helpers
- Convenience constructors for building AST argument slots and nodes.
- level_
set - Bitset of rewrite normalization levels. Const-friendly and runtime-mutable.
- plan
- Compiled rewrite plan: filtered rules and eliminated forms.
- rule
- Rule trait and metadata for the rewrite phase.
- rule_
context - Rule context and typed node views for rule matching.
- rules
- Builtin rewrite rule registry (auto-generated).
Structs§
- Contract
Violation - A single eliminated-form contract violation found in an AST.
- Rewrite
Report - Accumulates statistics across an entire rewrite pass.
- Rewrite
Rule Stat - Tracks how often a specific rule changed the AST or skipped after a scheduling target match.
Enums§
- Package
Name - Rewrite
Error - Top-level errors produced by the Rewrite phase.
- Rule
Error - Errors reported by individual rules during application.
Functions§
- all_
rules - Returns every registered rewrite rule.
- collect_
eliminated_ violations - Collects all eliminated-form contract violations currently present in
ast. - run
- Applies rewrite rules to an AST and records what changed.