mirror of
https://github.com/Smaug123/WoofWare.Whippet
synced 2025-10-08 01:08:39 +00:00
Some checks failed
.NET / build (Debug) (push) Has been cancelled
.NET / build (Release) (push) Has been cancelled
.NET / analyzers (push) Has been cancelled
.NET / build-nix (push) Has been cancelled
.NET / check-dotnet-format (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 / expected-pack (push) Has been cancelled
.NET / all-required-checks-complete (push) Has been cancelled
20 lines
723 B
Forth
20 lines
723 B
Forth
namespace WoofWare.Whippet.Fantomas
|
|
|
|
open Fantomas.FCS.Syntax
|
|
open Fantomas.FCS.Text.Range
|
|
|
|
/// Module for manipulating the AST `SynAttributes` type. This represents a collection of `[<FooAttribute>]` objects:
|
|
/// if you have `[<A>] [<B ; C>] foo` then the SynAttributes contains two elements, `[A]` and `[B ; C]`, each of which
|
|
/// is a list of attributes.
|
|
[<RequireQualifiedAccess>]
|
|
module SynAttributes =
|
|
/// Build a SynAttributes of the form `[<A>] [<B>] [<C>]`, i.e. one `[<>]` for each input attribute.
|
|
let ofAttrs (attrs : SynAttribute list) : SynAttributes =
|
|
attrs
|
|
|> List.map (fun a ->
|
|
{
|
|
Attributes = [ a ]
|
|
Range = range0
|
|
}
|
|
)
|