Module mutator

Module mutator 

Source

Structs§

MutatorState
The mutable state every mutator pass carries: the input grammar and the builder for the output grammar.
OwnedExpr
An owned copy of a GrammarExpr — needed because visiting borrows state mutably while the expr lives in state.base.

Traits§

GrammarMutator
A grammar-transforming pass. Mirrors C++ GrammarMutator: the default apply adds empty rules to keep ids stable, then visits each rule body and lookahead assertion.

Functions§

rebuild_tag_dispatch
Decode a TagDispatch and rebuild it into builder unchanged. Shared by the default visit_tag_dispatch and several passes.