You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fantomas.Core currently exposes a way to generate source code by passing in a raw syntax tree.
This syntax tree (from FSharp.Compiler.Syntax in Fantomas.FCS) will internally be transformed into a SyntaxOak (in ASTTransformer).
We could make the SyntaxOak public (in 5.2 it is internal) and expose a method to format an Oak to string.
Additionally, we could have another method that parses a string to an Oak.
Tools that use Fantomas today for code generation could benefit from this as our Oak model is easier to reason with.
Only the new methods in CodeFormatter would be considered part of the stable API. The exact Oak model types will be forever in flux according to the needs of Fantomas. The API won't be considered broken if any of those underlying types change.
Nor will Fantomas provide any DSL to easily construct nodes in our Oak model, that would all be the consumer's responsibility.
Fantomas.Core
currently exposes a way to generate source code by passing in a raw syntax tree.This syntax tree (from FSharp.Compiler.Syntax in
Fantomas.FCS
) will internally be transformed into a SyntaxOak (inASTTransformer
).We could make the
SyntaxOak
public (in5.2
it is internal) and expose a method to format anOak
to string.Additionally, we could have another method that parses a string to an
Oak
.Tools that use Fantomas today for code generation could benefit from this as our
Oak
model is easier to reason with.Only the new methods in
CodeFormatter
would be considered part of the stable API. The exactOak
model types will be forever in flux according to the needs of Fantomas. The API won't be considered broken if any of those underlying types change.Nor will Fantomas provide any DSL to easily construct nodes in our
Oak
model, that would all be the consumer's responsibility.//cc @edgarfgp
The text was updated successfully, but these errors were encountered: