Header menu logo Fabulous.AST

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

Gen.mkOak root

Full Usage: Gen.mkOak root

Parameters:
Returns: 'node

Builds the Fantomas node for , recursively creating all children nodes.

root : WidgetBuilder<'node>
Returns: 'node

Gen.parse widget

Full Usage: Gen.parse widget

Parameters:
Returns: string

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.

widget : WidgetBuilder<Oak>
Returns: string

Gen.parse source

Full Usage: Gen.parse source

Parameters:
    source : 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.

source : string
Returns: string

Gen.run (oak, config)

Full Usage: Gen.run (oak, config)

Parameters:
Returns: string

Formats to F# source using .

oak : Oak
config : FormatConfig
Returns: string

Gen.run oak

Full Usage: Gen.run oak

Parameters:
Returns: string

Formats to F# source using the default config.

oak : Oak
Returns: string

Type something to start searching.