I've been using FormatASTAsync to format my code, but I found out that it is removed the single quotes from characters.
let code = "let x = 'A'"
let tree, _ = parseFile false (SourceText.ofString code) []
let formattedCode = CodeFormatter.FormatASTAsync(tree) |> Async.RunSynchronously
I've also tried:
let code = "let x = 'A'"
let [|(tree,_)|] = CodeFormatter.ParseAsync(false, code) |> Async.RunSynchronously
let formattedCode = CodeFormatter.FormatASTAsync(tree) |> Async.RunSynchronously
But that has the same issue.
I'm using:
- Fantomas.Core: 6.3.2
- Fantomas.FCS: 6.3.2
- FSharp.Core: 8.0.200
I've been using
FormatASTAsyncto format my code, but I found out that it is removed the single quotes from characters.I've also tried:
But that has the same issue.
I'm using: