Skip to content

Commit

Permalink
Rename a value
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh DeGraw committed Jan 4, 2023
1 parent 3f59a55 commit 9b77e15
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Fantomas.Core/CodePrinter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3064,8 +3064,9 @@ let genType (t: Type) =

fun (ctx: Context) ->
let size = getRecordSize ctx node.Fields

genNode node (isSmallExpression size smallExpression longExpression) ctx
|> dumpAndContinue
|> dumpAndContinue

| Type.Paren node ->
genSingleTextNode node.OpeningParen
Expand Down Expand Up @@ -3262,7 +3263,7 @@ let genTypeDefn (td: TypeDefn) =
let multilineExpression (ctx: Context) =
let noMembers = List.isEmpty members

let genOtherFields =
let genRecordFields =
genSingleTextNode node.OpeningBrace
+> indentSepNlnUnindent (atCurrentColumn (col sepNln node.Fields genField))
+> sepNln
Expand All @@ -3275,7 +3276,7 @@ let genTypeDefn (td: TypeDefn) =

let aligned =
opt (indent +> sepNln) node.Accessibility genSingleTextNode
+> genOtherFields
+> genRecordFields
+> optSingle (fun _ -> unindent) node.Accessibility
+> genMembers

Expand All @@ -3285,7 +3286,7 @@ let genTypeDefn (td: TypeDefn) =
let genMultilineExpression =
match ctx.Config.MultilineBracketStyle with
| ExperimentalStroustrup when noMembers ->
genAccessOpt node.Accessibility +> genOtherFields +> genMembers
genAccessOpt node.Accessibility +> genRecordFields +> genMembers
| Aligned
| ExperimentalStroustrup -> aligned
| Cramped when anyFieldHasXmlDoc -> aligned
Expand Down

0 comments on commit 9b77e15

Please sign in to comment.