Skip to content

Commit

Permalink
Fix some more unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Jun 3, 2022
1 parent 99821fe commit 9cb0f24
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
12 changes: 3 additions & 9 deletions src/Fantomas.Core/AstTransformer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -447,15 +447,9 @@ module private Ast =
|> finalContinuation)
| SynExpr.LetOrUse (_, _, bindings, body, _, trivia) ->
visit body (fun nodes ->
mkSynExprNode
SynExpr_LetOrUse
synExpr
synExpr.Range
(sortChildren
[| yield! (List.map visitSynBinding bindings)
yield! Option.toList (mkNodeOption SynExpr_LetOrUse_In trivia.InKeyword)
yield! nodes |])
|> List.singleton
[ yield! (List.map visitSynBinding bindings)
yield! Option.toList (mkNodeOption SynExpr_LetOrUse_In trivia.InKeyword)
yield! nodes ]
|> finalContinuation)
| SynExpr.TryWith (tryExpr,
withCases,
Expand Down
5 changes: 4 additions & 1 deletion src/Fantomas.Core/CodePrinter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3810,7 +3810,10 @@ and genTypeDefn
+> genEq SynTypeDefn_Equals equalsRange
+> indent
+> sepNln
+> genMemberDefnList { astContext with InterfaceRange = None } others
+> genTriviaFor
SynTypeDefnRepr_ObjectModel
tdr.Range
(genMemberDefnList { astContext with InterfaceRange = None } others)
+> unindent

| ExceptionRepr (ExceptionDefRepr (ats, px, ao, uc)) -> genExceptionBody astContext ats px ao uc
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas.Core/TriviaTypes.fs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ type FsAstType =
| SynExpr_TypeApp
| SynExpr_TypeApp_Less
| SynExpr_TypeApp_Greater
| SynExpr_LetOrUse
// | SynExpr_LetOrUse use first nested SynExpr
| SynExpr_LetOrUse_In
| SynExpr_TryWith
| SynExpr_TryWith_Try
Expand Down

0 comments on commit 9cb0f24

Please sign in to comment.