Module mutator
metrale_
grammar
1.0.0-beta-preview
Module mutator
Module Items
Structs
Traits
Functions
In metrale_
grammar::
grammar::
functor
metrale_grammar
::
grammar
::
functor
Module
mutator
Copy item path
Source
Structs
§
Mutator
State
The mutable state every mutator pass carries: the input grammar and the builder for the output grammar.
Owned
Expr
An owned copy of a
GrammarExpr
— needed because visiting borrows
state
mutably while the expr lives in
state.base
.
Traits
§
Grammar
Mutator
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.