Gen Type
Renders a widget tree to F# source and verifies the result. mkOak turns
the root widget into a Fantomas node (recursively building its children),
run formats that node to source (optionally with a config), and parse round-trips
the source back through the parser to confirm it is syntactically valid.
Designed for pipeline use, e.g. widget |> Gen.parse or
widget |> Gen.mkOak |> Gen.run |> Gen.parse.
Static members
| Static member |
Description
|
|
The config
|
Full Usage:
Gen.mkOak root
Parameters:
WidgetBuilder<'node>
Returns: 'node
Type parameters: 'node |
Builds the Fantomas node for
|
|
Renders widget to source and parses it back to confirm Fabulous.AST produced syntactically valid F#. Returns the rendered source when valid, otherwise the formatted error diagnostics (or the render failure message) separated by the OS newline.
|
Full Usage:
Gen.parse source
Parameters:
string
Returns: string
|
Parses source with Fantomas's F# parser. Returns the source unchanged when syntactically valid, otherwise the formatted error diagnostics separated by the OS newline. Does not type-check — for that, run the real compiler against the written files.
|
|
|
|
Fabulous.AST