Add SynField.withMutability (#31)
Some checks failed
.NET / check-dotnet-format (push) Has been cancelled
.NET / build (Debug) (push) Has been cancelled
.NET / check-nix-format (push) Has been cancelled
.NET / Check links (push) Has been cancelled
.NET / Check flake (push) Has been cancelled
.NET / nuget-pack (push) Has been cancelled
.NET / check-accurate-generations (push) Has been cancelled
.NET / build (Release) (push) Has been cancelled
.NET / analyzers (push) Has been cancelled
.NET / expected-pack (push) Has been cancelled
.NET / all-required-checks-complete (push) Has been cancelled
.NET / nuget-publish (push) Has been cancelled
.NET / nuget-publish-core (push) Has been cancelled
.NET / nuget-publish-fantomas (push) Has been cancelled
.NET / nuget-publish-json-plugin (push) Has been cancelled
.NET / nuget-publish-json-attrs (push) Has been cancelled
.NET / nuget-publish-argparser-plugin (push) Has been cancelled
.NET / nuget-publish-argparser-attrs (push) Has been cancelled
.NET / nuget-publish-httpclient-plugin (push) Has been cancelled
.NET / nuget-publish-httpclient-attrs (push) Has been cancelled
.NET / nuget-publish-interfacemock-plugin (push) Has been cancelled
.NET / nuget-publish-interfacemock-attrs (push) Has been cancelled
.NET / nuget-publish-swagger-plugin (push) Has been cancelled

This commit is contained in:
Patrick Stevens
2025-04-13 21:08:16 +01:00
committed by GitHub
parent 75b063ba39
commit 546762652a
3 changed files with 10 additions and 2 deletions

View File

@@ -271,6 +271,7 @@ WoofWare.Whippet.Fantomas.SynField.extractWithIdent [static method]: Fantomas.FC
WoofWare.Whippet.Fantomas.SynField.make [static method]: Fantomas.FCS.Syntax.Ident option WoofWare.Whippet.Fantomas.SynFieldData -> Fantomas.FCS.Syntax.SynField
WoofWare.Whippet.Fantomas.SynField.mapIdent [static method]: ('a -> 'b) -> 'a WoofWare.Whippet.Fantomas.SynFieldData -> 'b WoofWare.Whippet.Fantomas.SynFieldData
WoofWare.Whippet.Fantomas.SynField.withDocString [static method]: Fantomas.FCS.Xml.PreXmlDoc -> Fantomas.FCS.Syntax.SynField -> Fantomas.FCS.Syntax.SynField
WoofWare.Whippet.Fantomas.SynField.withMutability [static method]: bool -> Fantomas.FCS.Syntax.SynField -> Fantomas.FCS.Syntax.SynField
WoofWare.Whippet.Fantomas.SynFieldData`1 inherit obj
WoofWare.Whippet.Fantomas.SynFieldData`1..ctor [constructor]: (Fantomas.FCS.Syntax.SynAttribute list, 'Ident, Fantomas.FCS.Syntax.SynType)
WoofWare.Whippet.Fantomas.SynFieldData`1.Attrs [property]: [read-only] Fantomas.FCS.Syntax.SynAttribute list

View File

@@ -78,3 +78,10 @@ module SynField =
match f with
| SynField (attributes, isStatic, idOpt, fieldType, isMutable, _, accessibility, range, trivia) ->
SynField (attributes, isStatic, idOpt, fieldType, isMutable, doc, accessibility, range, trivia)
/// Set the mutability of this `SynField`.
/// For example, `{ mutable Foo : int }` is a record with one mutable field.
let withMutability (isMutable : bool) (f : SynField) : SynField =
match f with
| SynField (attributes, isStatic, idOpt, fieldType, _, doc, accessibility, range, trivia) ->
SynField (attributes, isStatic, idOpt, fieldType, isMutable, doc, accessibility, range, trivia)

View File

@@ -1,5 +1,5 @@
{
"version": "0.4",
"version": "0.5",
"publicReleaseRefSpec": [
"^refs/heads/main$"
],
@@ -9,4 +9,4 @@
":/global.json",
":/Directory.Build.props"
]
}
}