mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-11 23:18:43 +00:00
Make more extensive use of our own DSLs (#153)
This commit is contained in:
16
WoofWare.Myriad.Plugins/SynExpr/Ident.fs
Normal file
16
WoofWare.Myriad.Plugins/SynExpr/Ident.fs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace WoofWare.Myriad.Plugins
|
||||
|
||||
open System
|
||||
open System.Text
|
||||
open Fantomas.FCS.Syntax
|
||||
open Fantomas.FCS.Text.Range
|
||||
|
||||
[<RequireQualifiedAccess>]
|
||||
module internal Ident =
|
||||
let inline create (s : string) = Ident (s, range0)
|
||||
|
||||
let lowerFirstLetter (x : Ident) : Ident =
|
||||
let result = StringBuilder x.idText.Length
|
||||
result.Append (Char.ToLowerInvariant x.idText.[0]) |> ignore
|
||||
result.Append x.idText.[1..] |> ignore
|
||||
create ((result : StringBuilder).ToString ())
|
Reference in New Issue
Block a user