CodeFormatter Type
Static members
Static member |
Description
|
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
|
|
|
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
|
|
|
Full Usage:
CodeFormatter.FormatSelectionAsync(isSignature, source, selection, config)
Parameters:
bool
source : string
selection : range
config : FormatConfig
Returns: Async<string * range>
|
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.
|
Full Usage:
CodeFormatter.GetVersion()
Returns: string
|
Returns the version of Fantomas found in the AssemblyInfo
|
Full Usage:
CodeFormatter.IsValidFSharpCodeAsync(isSignature, source)
Parameters:
bool
source : string
Returns: Async<bool>
|
Check whether an input string is invalid in F# by attempting to parse the code.
|
Full Usage:
CodeFormatter.MakePosition(line, column)
Parameters:
int
column : int
Returns: pos
|
|
Full Usage:
CodeFormatter.MakeRange(fileName, startLine, startCol, endLine, endCol)
Parameters:
string
startLine : int
startCol : int
endLine : int
endCol : int
Returns: range
|
Make a range from (startLine, startCol) to (endLine, endCol) to select some text
|
Full Usage:
CodeFormatter.ParseAsync(isSignature, source)
Parameters:
bool
source : string
Returns: Async<(ParsedInput * string list) array>
|
Parse a source string using given config
|
|
|
Full Usage:
CodeFormatter.TransformAST(ast, source)
Parameters:
ParsedInput
source : string
Returns: Oak
|
|
|