From 5e21dcc5a4e50df9dff217d6cc004d5d58014976 Mon Sep 17 00:00:00 2001 From: nojaf Date: Wed, 28 Dec 2022 11:13:00 +0100 Subject: [PATCH 1/4] Update FCS to ' Include inline in trivia', e30d14cb46f290050ac8e2bbea5e9b804b97bdde --- Directory.Build.props | 2 +- build.fsx | 2 -- src/Fantomas.FCS/Fantomas.FCS.fsproj | 6 ------ src/Fantomas.FCS/Parse.fs | 12 ++++++++---- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 890a019b46..326ef21ebb 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -38,7 +38,7 @@ Some common use cases include: - 70499ce779ffeeda0a1d96761a184981baf762ef + e30d14cb46f290050ac8e2bbea5e9b804b97bdde 2.8.28 6.0.1 diff --git a/build.fsx b/build.fsx index ac7fee9d3e..311ba8355d 100644 --- a/build.fsx +++ b/build.fsx @@ -256,8 +256,6 @@ pipeline "Init" { "src/Compiler/Utilities/range.fsi" "src/Compiler/Utilities/range.fs" "src/Compiler/Facilities/UtilsStrings.txt" - "src/Compiler/Facilities/Logger.fsi" - "src/Compiler/Facilities/Logger.fs" "src/Compiler/Facilities/LanguageFeatures.fsi" "src/Compiler/Facilities/LanguageFeatures.fs" "src/Compiler/Facilities/DiagnosticOptions.fsi" diff --git a/src/Fantomas.FCS/Fantomas.FCS.fsproj b/src/Fantomas.FCS/Fantomas.FCS.fsproj index 25760dbbfa..a9b1b3667c 100644 --- a/src/Fantomas.FCS/Fantomas.FCS.fsproj +++ b/src/Fantomas.FCS/Fantomas.FCS.fsproj @@ -131,12 +131,6 @@ Utilities\range.fs - - Facilities\Logger.fsi - - - Facilities\Logger.fs - Facilities\LanguageFeatures.fsi diff --git a/src/Fantomas.FCS/Parse.fs b/src/Fantomas.FCS/Parse.fs index 2a99fec40a..effb28d547 100644 --- a/src/Fantomas.FCS/Parse.fs +++ b/src/Fantomas.FCS/Parse.fs @@ -205,7 +205,8 @@ let private PostParseModuleImpls impls, isLastCompiland, { ConditionalDirectives = conditionalDirectives - CodeComments = codeComments } + CodeComments = codeComments }, + Set.empty ) ) @@ -308,7 +309,8 @@ let private PostParseModuleSpecs hashDirectives, specs, { ConditionalDirectives = conditionalDirectives - CodeComments = codeComments } + CodeComments = codeComments }, + Set.empty ) ) @@ -384,7 +386,8 @@ let private EmptyParsedInput (filename, isLastCompiland) = [], [], { ConditionalDirectives = [] - CodeComments = [] } + CodeComments = [] }, + Set.empty ) ) else @@ -398,7 +401,8 @@ let private EmptyParsedInput (filename, isLastCompiland) = [], isLastCompiland, { ConditionalDirectives = [] - CodeComments = [] } + CodeComments = [] }, + Set.empty ) ) From 4cc8883d4cfc783e1fbbde2e2f45bb18cbdc0a5e Mon Sep 17 00:00:00 2001 From: nojaf Date: Wed, 28 Dec 2022 11:29:42 +0100 Subject: [PATCH 2/4] Print trivia before inline keyword in binding. --- .../CodePrinterHelperFunctionsTests.fs | 4 +-- src/Fantomas.Core.Tests/FangornTests.fs | 3 ++- src/Fantomas.Core.Tests/LetBindingTests.fs | 27 +++++++++++++++++++ src/Fantomas.Core.Tests/SynLongIdentTests.fs | 3 ++- src/Fantomas.Core/CodePrinter2.fs | 26 ++++++++++++++---- src/Fantomas.Core/Fangorn.fs | 4 +-- src/Fantomas.Core/SyntaxOak.fs | 5 ++-- 7 files changed, 59 insertions(+), 13 deletions(-) diff --git a/src/Fantomas.Core.Tests/CodePrinterHelperFunctionsTests.fs b/src/Fantomas.Core.Tests/CodePrinterHelperFunctionsTests.fs index c72894b7dc..c0d81deba2 100644 --- a/src/Fantomas.Core.Tests/CodePrinterHelperFunctionsTests.fs +++ b/src/Fantomas.Core.Tests/CodePrinterHelperFunctionsTests.fs @@ -218,7 +218,7 @@ let a = None, MultipleTextsNode([ stn "let" ], zeroRange), false, - false, + None, None, Choice1Of2(IdentListNode([ IdentifierOrDot.Ident(stn "a") ], zeroRange)), None, @@ -324,7 +324,7 @@ let b = 2 None, MultipleTextsNode([ stn "let" ], zeroRange), false, - false, + None, None, Choice1Of2(IdentListNode([ IdentifierOrDot.Ident(stn name) ], zeroRange)), None, diff --git a/src/Fantomas.Core.Tests/FangornTests.fs b/src/Fantomas.Core.Tests/FangornTests.fs index ff2eb30739..5306fcae6d 100644 --- a/src/Fantomas.Core.Tests/FangornTests.fs +++ b/src/Fantomas.Core.Tests/FangornTests.fs @@ -54,7 +54,8 @@ let ``avoid stack-overflow in long array/list, 2485`` () = ) ], (false, false), { ConditionalDirectives = [] - CodeComments = [] } + CodeComments = [] }, + Set.empty ) ) diff --git a/src/Fantomas.Core.Tests/LetBindingTests.fs b/src/Fantomas.Core.Tests/LetBindingTests.fs index acbd0e1b1a..985eedfb49 100644 --- a/src/Fantomas.Core.Tests/LetBindingTests.fs +++ b/src/Fantomas.Core.Tests/LetBindingTests.fs @@ -2133,3 +2133,30 @@ let inline (!!) (x: ^a) : ^b = ((^a or ^b): (static member op_Implicit: ^a -> ^b let inline (!!) (x: ^a) : ^b = ((^a or ^b): (static member op_Implicit: ^a -> ^b) x) """ + +[] +let ``trivia around inline keyword, 2017`` () = + formatSourceString + false + """ + let +#if !DEBUG + inline +#endif + map f ar = Async.map (Result.map f) ar +""" + config + |> prepend newline + |> should + equal + """ +let +#if !DEBUG + inline +#endif + map + f + ar + = + Async.map (Result.map f) ar +""" diff --git a/src/Fantomas.Core.Tests/SynLongIdentTests.fs b/src/Fantomas.Core.Tests/SynLongIdentTests.fs index 9d7b2d9bab..a3b5dbb0e0 100644 --- a/src/Fantomas.Core.Tests/SynLongIdentTests.fs +++ b/src/Fantomas.Core.Tests/SynLongIdentTests.fs @@ -388,7 +388,8 @@ let ``backticks can be added from AST only scenarios`` () = ) ], (true, false), { ConditionalDirectives = [] - CodeComments = [] } + CodeComments = [] }, + Set.empty ) ) diff --git a/src/Fantomas.Core/CodePrinter2.fs b/src/Fantomas.Core/CodePrinter2.fs index fd783fd902..7065471bdd 100644 --- a/src/Fantomas.Core/CodePrinter2.fs +++ b/src/Fantomas.Core/CodePrinter2.fs @@ -2645,7 +2645,7 @@ let genBinding (b: BindingNode) (ctx: Context) : Context = let afterLetKeyword = ifElse b.IsMutable (!- "mutable ") sepNone - +> ifElse b.IsInline (!- "inline ") sepNone + +> genInline b.Inline +> genAccessOpt b.Accessibility let genFunctionName = @@ -2710,7 +2710,17 @@ let genBinding (b: BindingNode) (ctx: Context) : Context = | _ -> col sepNln b.Parameters genPat, false | _ -> col sepNln b.Parameters genPat, false - (afterLetKeyword + let hasTriviaAfterLeadingKeyword = + let beforeInline = + match b.Inline with + | None -> false + | Some n -> (n :> Node).HasContentBefore + + let beforeIdentifier = (functionName :> Node).HasContentBefore + beforeInline || beforeIdentifier + + (onlyIf hasTriviaAfterLeadingKeyword indent + +> afterLetKeyword +> sepSpace +> genFunctionName +> indent @@ -2724,7 +2734,8 @@ let genBinding (b: BindingNode) (ctx: Context) : Context = sepNln +> genSingleTextNode b.Equals else sepSpace +> genSingleTextNode b.Equals) - +> unindent) + +> unindent + +> onlyIf hasTriviaAfterLeadingKeyword unindent) ctx expressionFitsOnRestOfLine short long @@ -2759,7 +2770,7 @@ let genBinding (b: BindingNode) (ctx: Context) : Context = let afterLetKeyword = genAccessOpt b.Accessibility +> ifElse b.IsMutable (!- "mutable ") sepNone - +> ifElse b.IsInline (!- "inline ") sepNone + +> genInline b.Inline let genDestructedTuples = expressionFitsOnRestOfLine (genPat pat) (sepOpenT +> genPat pat +> sepCloseT) @@ -2794,7 +2805,7 @@ let genBinding (b: BindingNode) (ctx: Context) : Context = let afterLetKeyword = ifElse b.IsMutable (!- "mutable ") sepNone - +> ifElse b.IsInline (!- "inline ") sepNone + +> genInline b.Inline +> genAccessOpt b.Accessibility let genValueName = @@ -3466,6 +3477,11 @@ let genTypeAndParam (genTypeName: Context -> Context) (tds: TyparDecls option) = | Some(TyparDecls.PrefixList _) -> optSingle (fun tds -> genTyparDecls tds +> sepSpace) tds +> genTypeName | Some(TyparDecls.SinglePrefix singlePrefixNode) -> genTyparDecl true singlePrefixNode +> sepSpace +> genTypeName +let genInline (inlineNode: SingleTextNode option) = + match inlineNode with + | None -> sepNone + | Some inlineNode -> genSingleTextNodeWithSpaceSuffix sepSpace inlineNode + let genVal (node: ValNode) (optGetSet: MultipleTextsNode option) = let genOptExpr = match node.Equals, node.Expr with diff --git a/src/Fantomas.Core/Fangorn.fs b/src/Fantomas.Core/Fangorn.fs index d93b9cb45f..f0ac79b30b 100644 --- a/src/Fantomas.Core/Fangorn.fs +++ b/src/Fantomas.Core/Fangorn.fs @@ -1512,7 +1512,7 @@ let (|OperatorWithStar|_|) (si: SynIdent) = let mkBinding (creationAide: CreationAide) - (SynBinding(_, _, isInline, isMutable, attributes, xmlDoc, _, pat, returnInfo, expr, _, _, trivia)) + (SynBinding(_, _, _, isMutable, attributes, xmlDoc, _, pat, returnInfo, expr, _, _, trivia)) = let mkFunctionName (sli: SynLongIdent) : IdentListNode = match sli.IdentsWithTrivia with @@ -1570,7 +1570,7 @@ let mkBinding mkAttributes creationAide attributes, mkSynLeadingKeyword trivia.LeadingKeyword, isMutable, - isInline, + Option.map (stn "inline") trivia.InlineKeyword, mkSynAccess ao, functionName, genericParameters, diff --git a/src/Fantomas.Core/SyntaxOak.fs b/src/Fantomas.Core/SyntaxOak.fs index 8d92a19a4d..0cb84e9819 100644 --- a/src/Fantomas.Core/SyntaxOak.fs +++ b/src/Fantomas.Core/SyntaxOak.fs @@ -2178,7 +2178,7 @@ type BindingNode attributes: MultipleAttributeListNode option, leadingKeyword: MultipleTextsNode, isMutable: bool, - isInline: bool, + inlineNode: SingleTextNode option, accessibility: SingleTextNode option, functionName: Choice, genericTypeParameters: TyparDecls option, @@ -2193,7 +2193,7 @@ type BindingNode member x.Attributes = attributes member x.LeadingKeyword = leadingKeyword member x.IsMutable = isMutable - member x.IsInline = isInline + member x.Inline = inlineNode member x.Accessibility = accessibility member x.FunctionName = functionName member x.GenericTypeParameters = genericTypeParameters @@ -2206,6 +2206,7 @@ type BindingNode [| yield! noa xmlDoc yield! noa attributes yield leadingKeyword + yield! noa inlineNode yield! noa accessibility yield match functionName with From f0aaa15bc6d18a482786743700f56b021563b5cf Mon Sep 17 00:00:00 2001 From: nojaf Date: Wed, 28 Dec 2022 11:40:46 +0100 Subject: [PATCH 3/4] Add inline keyword to PropertyGetSetBindingNode. --- .../Fantomas.Core.Tests.fsproj | 1 + src/Fantomas.Core.Tests/InlineTests.fs | 85 +++++++++++++++++++ src/Fantomas.Core.Tests/LetBindingTests.fs | 27 ------ src/Fantomas.Core/CodePrinter2.fs | 15 ++-- src/Fantomas.Core/Fangorn.fs | 26 +++--- src/Fantomas.Core/SyntaxOak.fs | 13 +-- 6 files changed, 116 insertions(+), 51 deletions(-) create mode 100644 src/Fantomas.Core.Tests/InlineTests.fs diff --git a/src/Fantomas.Core.Tests/Fantomas.Core.Tests.fsproj b/src/Fantomas.Core.Tests/Fantomas.Core.Tests.fsproj index 63f120a1f5..236f40fdd7 100644 --- a/src/Fantomas.Core.Tests/Fantomas.Core.Tests.fsproj +++ b/src/Fantomas.Core.Tests/Fantomas.Core.Tests.fsproj @@ -118,6 +118,7 @@ + diff --git a/src/Fantomas.Core.Tests/InlineTests.fs b/src/Fantomas.Core.Tests/InlineTests.fs new file mode 100644 index 0000000000..c755b6f540 --- /dev/null +++ b/src/Fantomas.Core.Tests/InlineTests.fs @@ -0,0 +1,85 @@ +module Fantomas.Core.Tests.InlineTests + +open NUnit.Framework +open FsUnit +open Fantomas.Core.Tests.TestHelper + +[] +let ``trivia around inline keyword, 2017`` () = + formatSourceString + false + """ + let +#if !DEBUG + inline +#endif + map f ar = Async.map (Result.map f) ar +""" + config + |> prepend newline + |> should + equal + """ +let +#if !DEBUG + inline +#endif + map + f + ar + = + Async.map (Result.map f) ar +""" + +[] +let ``inline in plain member`` () = + formatSourceString + false + """ +type X = + member inline x.Y () = () +""" + config + |> prepend newline + |> should + equal + """ +type X = + member inline x.Y() = () +""" + +[] +let ``inline in get/set member`` () = + formatSourceString + false + """ +type X = + member inline x.Y + with inline get () = 4 + and inline set y = () +""" + config + |> prepend newline + |> should + equal + """ +type X = + member inline x.Y + with inline get () = 4 + and inline set y = () +""" + +[] +let ``inline in val`` () = + formatSourceString + true + """ +val inline meh: int -> int +""" + config + |> prepend newline + |> should + equal + """ +val inline meh: int -> int +""" diff --git a/src/Fantomas.Core.Tests/LetBindingTests.fs b/src/Fantomas.Core.Tests/LetBindingTests.fs index 985eedfb49..acbd0e1b1a 100644 --- a/src/Fantomas.Core.Tests/LetBindingTests.fs +++ b/src/Fantomas.Core.Tests/LetBindingTests.fs @@ -2133,30 +2133,3 @@ let inline (!!) (x: ^a) : ^b = ((^a or ^b): (static member op_Implicit: ^a -> ^b let inline (!!) (x: ^a) : ^b = ((^a or ^b): (static member op_Implicit: ^a -> ^b) x) """ - -[] -let ``trivia around inline keyword, 2017`` () = - formatSourceString - false - """ - let -#if !DEBUG - inline -#endif - map f ar = Async.map (Result.map f) ar -""" - config - |> prepend newline - |> should - equal - """ -let -#if !DEBUG - inline -#endif - map - f - ar - = - Async.map (Result.map f) ar -""" diff --git a/src/Fantomas.Core/CodePrinter2.fs b/src/Fantomas.Core/CodePrinter2.fs index 7065471bdd..7563cb5a04 100644 --- a/src/Fantomas.Core/CodePrinter2.fs +++ b/src/Fantomas.Core/CodePrinter2.fs @@ -2645,7 +2645,7 @@ let genBinding (b: BindingNode) (ctx: Context) : Context = let afterLetKeyword = ifElse b.IsMutable (!- "mutable ") sepNone - +> genInline b.Inline + +> genInlineOpt b.Inline +> genAccessOpt b.Accessibility let genFunctionName = @@ -2770,7 +2770,7 @@ let genBinding (b: BindingNode) (ctx: Context) : Context = let afterLetKeyword = genAccessOpt b.Accessibility +> ifElse b.IsMutable (!- "mutable ") sepNone - +> genInline b.Inline + +> genInlineOpt b.Inline let genDestructedTuples = expressionFitsOnRestOfLine (genPat pat) (sepOpenT +> genPat pat +> sepCloseT) @@ -2805,7 +2805,7 @@ let genBinding (b: BindingNode) (ctx: Context) : Context = let afterLetKeyword = ifElse b.IsMutable (!- "mutable ") sepNone - +> genInline b.Inline + +> genInlineOpt b.Inline +> genAccessOpt b.Accessibility let genValueName = @@ -3477,7 +3477,7 @@ let genTypeAndParam (genTypeName: Context -> Context) (tds: TyparDecls option) = | Some(TyparDecls.PrefixList _) -> optSingle (fun tds -> genTyparDecls tds +> sepSpace) tds +> genTypeName | Some(TyparDecls.SinglePrefix singlePrefixNode) -> genTyparDecl true singlePrefixNode +> sepSpace +> genTypeName -let genInline (inlineNode: SingleTextNode option) = +let genInlineOpt (inlineNode: SingleTextNode option) = match inlineNode with | None -> sepNone | Some inlineNode -> genSingleTextNodeWithSpaceSuffix sepSpace inlineNode @@ -3491,7 +3491,7 @@ let genVal (node: ValNode) (optGetSet: MultipleTextsNode option) = genXml node.XmlDoc +> genAttributes node.Attributes +> optSingle (fun lk -> genMultipleTextsNode lk +> sepSpace) node.LeadingKeyword - +> onlyIf node.IsInline (!- "inline ") + +> genInlineOpt node.Inline +> onlyIf node.IsMutable (!- "mutable ") +> genAccessOpt node.Accessibility +> genTypeAndParam (genSingleTextNode node.Identifier) node.TypeParams @@ -3579,7 +3579,8 @@ let genMemberDefn (md: MemberDefn) = |> genNode (MemberDefn.Node md) | MemberDefn.PropertyGetSet node -> let genProperty (node: PropertyGetSetBindingNode) = - genAccessOpt node.Accessibility + genInlineOpt node.Inline + +> genAccessOpt node.Accessibility +> genSingleTextNode node.LeadingKeyword +> sepSpace +> col sepSpace node.Parameters genPat @@ -3592,7 +3593,7 @@ let genMemberDefn (md: MemberDefn) = +> genAttributes node.Attributes +> genMultipleTextsNode node.LeadingKeyword +> sepSpace - +> onlyIf node.IsInline (!- "inline ") + +> genInlineOpt node.Inline +> genAccessOpt node.Accessibility +> genIdentListNode node.MemberName +> indent diff --git a/src/Fantomas.Core/Fangorn.fs b/src/Fantomas.Core/Fangorn.fs index f0ac79b30b..3556f048ea 100644 --- a/src/Fantomas.Core/Fangorn.fs +++ b/src/Fantomas.Core/Fangorn.fs @@ -2323,7 +2323,8 @@ let mkPropertyGetSetBinding headPat = SynPat.LongIdent(extraId = Some extraIdent; accessibility = ao; argPats = SynArgPats.Pats ps) returnInfo = returnInfo expr = expr - trivia = { EqualsRange = Some mEq }) -> + trivia = { EqualsRange = Some mEq + InlineKeyword = inlineKw }) -> let e = parseExpressionInSynBinding returnInfo expr let returnTypeNode = mkBindingReturnInfo creationAide returnInfo @@ -2346,6 +2347,7 @@ let mkPropertyGetSetBinding let range = unionRanges extraIdent.idRange e.Range PropertyGetSetBindingNode( + Option.map (stn "inline") inlineKw, mkSynAccess ao, leadingKeyword, pats, @@ -2509,11 +2511,11 @@ let mkMemberDefn (creationAide: CreationAide) (md: SynMemberDefn) = |> MemberDefn.AbstractSlot | SynMemberDefn.GetSetMember(Some(SynBinding( accessibility = ao - isInline = isInline attributes = ats xmlDoc = px headPat = SynPat.LongIdent(longDotId = memberName) - trivia = { LeadingKeyword = lk }) as getBinding), + trivia = { LeadingKeyword = lk + InlineKeyword = inlineKw }) as getBinding), Some setBinding, _, { GetKeyword = Some getKeyword @@ -2532,7 +2534,7 @@ let mkMemberDefn (creationAide: CreationAide) (md: SynMemberDefn) = mkXmlDoc px, mkAttributes creationAide ats, mkSynLeadingKeyword lk, - isInline, + Option.map (stn "inline") inlineKw, mkSynAccess ao, mkSynLongIdent memberName, stn "with" withKeyword, @@ -2545,22 +2547,22 @@ let mkMemberDefn (creationAide: CreationAide) (md: SynMemberDefn) = | SynMemberDefn.GetSetMember(None, Some(SynBinding( accessibility = ao - isInline = isInline attributes = ats xmlDoc = px headPat = SynPat.LongIdent(longDotId = memberName) - trivia = { LeadingKeyword = lk }) as binding), + trivia = { LeadingKeyword = lk + InlineKeyword = inlineKw }) as binding), _, { WithKeyword = withKeyword GetKeyword = getKeyword SetKeyword = setKeyword }) | SynMemberDefn.GetSetMember(Some(SynBinding( accessibility = ao - isInline = isInline attributes = ats xmlDoc = px headPat = SynPat.LongIdent(longDotId = memberName) - trivia = { LeadingKeyword = lk }) as binding), + trivia = { LeadingKeyword = lk + InlineKeyword = inlineKw }) as binding), None, _, { WithKeyword = withKeyword @@ -2576,7 +2578,7 @@ let mkMemberDefn (creationAide: CreationAide) (md: SynMemberDefn) = mkXmlDoc px, mkAttributes creationAide ats, mkSynLeadingKeyword lk, - isInline, + Option.map (stn "inline") inlineKw, mkSynAccess ao, mkSynLongIdent memberName, stn "with" withKeyword, @@ -2594,7 +2596,7 @@ let mkMemberDefn (creationAide: CreationAide) (md: SynMemberDefn) = mkXmlDoc px, mkAttributes creationAide ats, mkSynLeadingKeyword lk, - isInline, + Option.map (stn "inline") inlineKw, mkSynAccess ao, mkSynLongIdent memberName, stn "with" withKeyword, @@ -2609,7 +2611,7 @@ let mkMemberDefn (creationAide: CreationAide) (md: SynMemberDefn) = let mkVal (creationAide: CreationAide) - (SynValSig(ats, synIdent, vtd, t, _vi, isInline, isMutable, px, ao, eo, range, trivia)) + (SynValSig(ats, synIdent, vtd, t, _vi, _isInline, isMutable, px, ao, eo, range, trivia)) : ValNode = let lk = match trivia.LeadingKeyword with @@ -2620,7 +2622,7 @@ let mkVal mkXmlDoc px, mkAttributes creationAide ats, lk, - isInline, + Option.map (stn "inline") trivia.InlineKeyword, isMutable, mkSynAccess ao, mkSynIdent synIdent, diff --git a/src/Fantomas.Core/SyntaxOak.fs b/src/Fantomas.Core/SyntaxOak.fs index 0cb84e9819..0d479a97e7 100644 --- a/src/Fantomas.Core/SyntaxOak.fs +++ b/src/Fantomas.Core/SyntaxOak.fs @@ -2713,6 +2713,7 @@ type MemberDefnAbstractSlotNode type PropertyGetSetBindingNode ( + inlineNode: SingleTextNode option, accessibility: SingleTextNode option, leadingKeyword: SingleTextNode, parameters: Pattern list, @@ -2724,13 +2725,15 @@ type PropertyGetSetBindingNode inherit NodeBase(range) override this.Children = - [| yield! noa accessibility + [| yield! noa inlineNode + yield! noa accessibility yield leadingKeyword yield! List.map Pattern.Node parameters yield! noa returnType yield equals yield Expr.Node expr |] + member x.Inline = inlineNode member x.Accessibility = accessibility member x.LeadingKeyword = leadingKeyword member x.Parameters = parameters @@ -2743,7 +2746,7 @@ type MemberDefnPropertyGetSetNode xmlDoc: XmlDocNode option, attributes: MultipleAttributeListNode option, leadingKeyword: MultipleTextsNode, - isInline: bool, + inlineNode: SingleTextNode option, accessibility: SingleTextNode option, memberName: IdentListNode, withKeyword: SingleTextNode, @@ -2768,7 +2771,7 @@ type MemberDefnPropertyGetSetNode member x.XmlDoc = xmlDoc member x.Attributes = attributes member x.LeadingKeyword = leadingKeyword - member x.IsInline = isInline + member x.Inline = inlineNode member x.Accessibility = accessibility member x.MemberName = memberName member x.WithKeyword = withKeyword @@ -2781,7 +2784,7 @@ type ValNode xmlDoc: XmlDocNode option, attributes: MultipleAttributeListNode option, leadingKeyword: MultipleTextsNode option, - isInline: bool, + inlineNode: SingleTextNode option, isMutable: bool, accessibility: SingleTextNode option, identifier: SingleTextNode, @@ -2807,7 +2810,7 @@ type ValNode member x.XmlDoc = xmlDoc member x.Attributes = attributes member x.LeadingKeyword = leadingKeyword - member x.IsInline = isInline + member x.Inline = inlineNode member x.IsMutable = isMutable member x.Accessibility = accessibility member x.Identifier = identifier From 058bb6f13f7485d6b5bb26111dc2c1bd05299279 Mon Sep 17 00:00:00 2001 From: nojaf Date: Thu, 29 Dec 2022 08:29:33 +0100 Subject: [PATCH 4/4] Add release notes for 5.2.0-alpha-009 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdf6651965..e8eaad997a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [5.2.0-alpha-009] - 2022-12-29 + +### Fixes +* ifdef removed when used on inline keyword in function. [#2017](https://github.com/fsprojects/fantomas/issues/2017) + +### Changed +* Update FCS to 'Include inline in trivia', commit e30d14cb46f290050ac8e2bbea5e9b804b97bdde + ## [5.2.0-alpha-008] - 2022-12-28 ### Fixes