Skip to content

Commit

Permalink
Call continuation for SynExpr.Record.
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Nov 21, 2022
1 parent 63539f8 commit 6edb042
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ let visitSynExpr (e: SynExpr) : FileContentEntry list =
| Some (t, e, _, _, _), None ->
visit e (fun nodes -> [ yield! visitSynType t; yield! nodes; yield! fieldNodes ] |> continuation)
| None, Some (e, _) -> visit e (fun nodes -> nodes @ fieldNodes |> continuation)
| _ -> fieldNodes
| _ -> continuation fieldNodes
| SynExpr.New (targetType = targetType; expr = expr) -> visit expr (fun nodes -> visitSynType targetType @ nodes |> continuation)
| SynExpr.ObjExpr (objType, argOptions, _, bindings, members, extraImpls, _, _) ->
[
Expand Down Expand Up @@ -684,7 +684,7 @@ module Tests =
[<Test>]
let ``Test a single file`` () =
let fileName =
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\CodeFormatter.fsi"
@"C:\Users\nojaf\Projects\main-fantomas\src\Fantomas.Core\Selection.fs"

let ast = parseSourceCode (fileName, System.IO.File.ReadAllText(fileName))
let contents = mkFileContent { Idx = 0; File = fileName; AST = ast }
Expand Down

0 comments on commit 6edb042

Please sign in to comment.