CodeFormatter Type
Static members
| Static member |
Description
|
Full Usage:
CodeFormatter.FormatASTAsync(ast, config, source)
Parameters:
ParsedInput
config : FormatConfig
source : string
Returns: Async<string>
|
Format an abstract syntax tree with the original source for trivia processing
|
Full Usage:
CodeFormatter.FormatASTAsync(ast, source)
Parameters:
ParsedInput
source : string
Returns: Async<string>
|
Format an abstract syntax tree with the original source for trivia processing
|
Full Usage:
CodeFormatter.FormatASTAsync(ast, config)
Parameters:
ParsedInput
config : FormatConfig
Returns: Async<string>
|
Format an abstract syntax tree using a given config. Without the source, comments and blank lines are not in the tree and cannot be printed, and literals are re-rendered from their values rather than kept as they were spelled.
|
|
Format an abstract syntax tree. Without the source, comments and blank lines are not in the tree and cannot be printed, and literals are re-rendered from their values rather than kept as they were spelled.
|
Full Usage:
CodeFormatter.FormatDocumentAsync(isSignature, source, config, cursor)
Parameters:
bool
-
Determines whether the F# parser will process the source as signature file.
source : string
-
F# source code
config : FormatConfig
-
Fantomas configuration
cursor : pos
-
The location of a cursor, zero-based.
Returns: Async<FormatResult>
|
Format a source string using an optional config.
|
Full Usage:
CodeFormatter.FormatDocumentAsync(isSignature, source, config)
Parameters:
bool
-
Determines whether the F# parser will process the source as signature file.
source : string
-
F# source code
config : FormatConfig
-
Fantomas configuration
Returns: Async<FormatResult>
|
Format a source string using an optional config.
|
Full Usage:
CodeFormatter.FormatDocumentAsync(isSignature, source)
Parameters:
bool
-
Determines whether the F# parser will process the source as signature file.
source : string
-
F# source code
Returns: Async<FormatResult>
|
Format a source string using an optional config.
|
Full Usage:
CodeFormatter.FormatOakAsync(oak, config)
Parameters:
Oak
config : FormatConfig
Returns: Async<string>
|
Format SyntaxOak to string using given config
|
|
|
Format a part of source string using given config, and return the (formatted) selected part only. Beware that the range argument is inclusive. The closest expression inside the selection will be formatted if possible.
|
|
|
Returns the version of Fantomas found in the AssemblyInfo
|
Full Usage:
CodeFormatter.GetWriterEventsAsync(isSignature, source, config, defines)
Parameters:
bool
source : string
config : FormatConfig
defines : string list
Returns: Async<WriterEvent array>
|
Debug only: returns the writer events produced during formatting of a source string with specific defines.
|
Full Usage:
CodeFormatter.GetWriterEventsAsync(isSignature, source, config)
Parameters:
bool
source : string
config : FormatConfig
Returns: Async<WriterEvent array>
|
Debug only: returns the writer events produced during formatting of a source string.
|
Full Usage:
CodeFormatter.GetWriterEventsAsync(isSignature, source)
Parameters: Returns: Async<WriterEvent array>
|
Debug only: returns the writer events produced during formatting of a source string.
|
Full Usage:
CodeFormatter.MakePosition(line, column)
Parameters:
int
column : int
Returns: pos
|
|
|
|
Full Usage:
CodeFormatter.TransformAST(ast, source)
Parameters:
ParsedInput
source : string
Returns: Oak
|
Transform a ParsedInput to an Oak, with the trivia found in the source attached to its nodes.
|
|
Transform a ParsedInput to an Oak without trivia; the source is needed to attach comments and blank lines and to keep the spelling of literals.
|
Full Usage:
CodeFormatter.ValidateFSharpCodeAsync(isSignature, source)
Parameters:
bool
-
Determines whether the F# parser will process the source as signature file.
source : string
-
F# source code
Returns: Async<ValidationResult>
|
Check whether an input string is valid F# by attempting to parse the code, and report what about it is not when it is not.
This replaces
|
fantomas