Fabulous.AST
0.8.0
See the version list below for details.
dotnet add package Fabulous.AST --version 0.8.0
NuGet\Install-Package Fabulous.AST -Version 0.8.0
<PackageReference Include="Fabulous.AST" Version="0.8.0" />
<PackageVersion Include="Fabulous.AST" Version="0.8.0" />
<PackageReference Include="Fabulous.AST" />
paket add Fabulous.AST --version 0.8.0
#r "nuget: Fabulous.AST, 0.8.0"
#:package Fabulous.AST@0.8.0
#addin nuget:?package=Fabulous.AST&version=0.8.0
#tool nuget:?package=Fabulous.AST&version=0.8.0
Fabulous.AST
Welcome to the Fabulous.AST, an Abstract Syntax Tree (AST) Domain Specific Language (DSL) for F#.
Fabulous.AST uses Fantomas to generate F# code from AST. This means that you can use Fabulous.AST to generate F# code that is formatted according to the Fantomas style guide. It's designed to provide a simple and expressive way to represent code as a tree of nodes. This makes it easier to manipulate and analyze code programmatically.
Let's take a look at an AST example in Fantomas:
open Fantomas.Core
open Fantomas.Core.SyntaxOak
open Fantomas.FCS.Text
Oak(
[],
[ ModuleOrNamespaceNode(
None,
[ BindingNode(
None,
None,
MultipleTextsNode([ SingleTextNode("let", Range.Zero) ], Range.Zero),
false,
None,
None,
Choice1Of2(IdentListNode([ IdentifierOrDot.Ident(SingleTextNode("x", Range.Zero)) ], Range.Zero)),
None,
[],
None,
SingleTextNode("=", Range.Zero),
Expr.Constant(Constant.FromText(SingleTextNode("12", Range.Zero))),
Range.Zero
)
|> ModuleDecl.TopLevelBinding ],
Range.Zero
) ],
Range.Zero
)
|> CodeFormatter.FormatOakAsync
|> Async.RunSynchronously
|> printfn "%s"
produces the following code:
let x = 12
Now let's take a look at same example using Fabulous.AST:
open Fantomas.Core
open type Fabulous.AST.Ast
AnonymousModule() {
Value("x", "12", false)
}
|> Gen.mkOak
|> CodeFormatter.FormatOakAsync
|> Async.RunSynchronously
|> printfn "%s"
produces the following code:
let x = 12
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Fantomas.Core (= 6.3.0-alpha-003)
-
net8.0
- Fantomas.Core (= 6.3.0-alpha-003)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Fabulous.AST:
| Package | Downloads |
|---|---|
|
MigrateLib
Declarative migrations for SQLite |
|
|
MigLib
Package Description |
|
|
Fabulous.AST.Json
Fabulous.AST.Json, a JSON type generator for Fabulous.AST |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-pre06 | 180 | 1/9/2026 |
| 2.0.0-pre05 | 232 | 12/19/2025 |
| 2.0.0-pre04 | 255 | 12/15/2025 |
| 2.0.0-pre03 | 175 | 12/13/2025 |
| 2.0.0-pre02 | 123 | 12/12/2025 |
| 2.0.0-pre01 | 128 | 12/12/2025 |
| 1.10.0 | 434 | 1/9/2026 |
| 1.9.0 | 912 | 12/12/2025 |
| 1.8.0 | 145 | 12/6/2025 |
| 1.7.0 | 673 | 12/3/2025 |
| 1.6.0 | 616 | 6/7/2025 |
| 1.5.0 | 190 | 5/10/2025 |
| 1.4.0 | 288 | 4/4/2025 |
| 1.3.0 | 258 | 3/16/2025 |
| 1.2.0 | 527 | 3/5/2025 |
| 1.1.0 | 223 | 1/12/2025 |
| 1.0.0 | 233 | 12/15/2024 |
| 1.0.0-pre9 | 287 | 5/13/2024 |
| 1.0.0-pre8 | 196 | 5/12/2024 |
| 1.0.0-pre7 | 213 | 5/10/2024 |
| 1.0.0-pre6 | 206 | 5/10/2024 |
| 1.0.0-pre5 | 236 | 4/14/2024 |
| 1.0.0-pre4 | 197 | 4/7/2024 |
| 1.0.0-pre3 | 216 | 4/1/2024 |
| 1.0.0-pre2 | 216 | 3/27/2024 |
| 1.0.0-pre17 | 183 | 10/6/2024 |
| 1.0.0-pre16 | 209 | 7/14/2024 |
| 1.0.0-pre15 | 215 | 7/1/2024 |
| 1.0.0-pre14 | 183 | 6/13/2024 |
| 1.0.0-pre13 | 205 | 6/2/2024 |
| 1.0.0-pre12 | 419 | 5/20/2024 |
| 1.0.0-pre11 | 205 | 5/16/2024 |
| 1.0.0-pre10 | 200 | 5/13/2024 |
| 1.0.0-pre1 | 208 | 3/25/2024 |
| 0.9.0 | 291 | 3/12/2024 |
| 0.8.2 | 253 | 3/11/2024 |
| 0.8.1 | 239 | 3/10/2024 |
| 0.8.0 | 261 | 3/8/2024 |
| 0.7.0 | 2,777 | 2/11/2024 |
| 0.6.2 | 375 | 6/8/2023 |
| 0.6.1 | 334 | 6/4/2023 |
| 0.6.0 | 323 | 5/29/2023 |
| 0.5.0 | 356 | 4/21/2023 |
| 0.4.0 | 383 | 4/13/2023 |
| 0.3.0 | 368 | 4/11/2023 |
| 0.2.0 | 353 | 4/6/2023 |
| 0.1.0 | 389 | 4/3/2023 |
### Updated
- Rework constant widgets by @edgarfgp in https://github.com/edgarfgp/Fabulous.AST/pull/57
- Update fsdocs-tool to 20.0.0
- Unify Module and Namespace
### Added
- Attribute Widgets by @edgarfgp in https://github.com/edgarfgp/Fabulous.AST/pull/58
- Type widgets by @edgarfgp in https://github.com/edgarfgp/Fabulous.AST/pull/59
- Add ConstantStringExpr widget