Rewrite Module
Bottom-up rewriter for expressions inside an Oak tree. Visits every
Expr reachable from the input
(including those nested inside type definitions, member bodies, patterns,
types and attributes) and applies the caller-supplied function after each
node's children are rebuilt. Reference equality is preserved on unchanged
subtrees, so a no-op rewrite returns the same Oak instance.
Curried with the target last, so it drops into a pipeline:
widget |> Rewrite.expr f |> Gen.run.
Functions and values
| Function or value | Description |
Full Usage:
Rewrite.expr f widget
Parameters:
Expr -> Expr
widget : WidgetBuilder<Oak>
Returns: WidgetBuilder<Oak>
|
|
|
|
Full Usage:
Rewrite.typeDefn g widget
Parameters:
TypeDefn -> TypeDefn
widget : WidgetBuilder<Oak>
Returns: WidgetBuilder<Oak>
|
Rewrites every TypeDefn in the Oak produced by widget,
returning the same
|
|
Fabulous.AST