vigoo/moonbit_codegen/doc does not have a README file
pub(all) struct AbstractTypeDecl {
name : String
type_params : Array[String]
vis : Visibility
} derive(Eq, Debug)pub(all) struct AliasDecl {
name : String
type_params : Array[String]
target : TypeExpr
vis : Visibility
} derive(Eq, Debug)pub(all) enum Decl {
Struct(StructDecl)
Enum(EnumDecl)
Suberror(SuberrorDecl)
Newtype(NewtypeDecl)
AbstractType(AbstractTypeDecl)
Alias(AliasDecl)
Trait(TraitDecl)
Impl(ImplDecl)
Extend(ExtendDecl)
Fn(FnDecl)
Let(LetDecl)
Test(TestDecl)
Using(UsingDecl)
Raw(String)
} derive(Eq, Debug)pub(all) struct EnumDecl {
name : String
type_params : Array[String]
vis : Visibility
variants : Array[EnumVariant]
derives : Array[String]
non_exhaustive : Bool
} derive(Eq, Debug)pub(all) struct EnumVariant {
name : String
payload : Array[(String?, TypeExpr)]
doc : DocComment
} derive(Eq, Debug)pub(all) struct LetDecl {
name : String
ty : TypeExpr?
value : String
is_const : Bool
vis : Visibility
} derive(Eq, Debug)pub(all) struct StructDecl {
name : String
type_params : Array[String]
vis : Visibility
fields : Array[StructField]
derives : Array[String]
} derive(Eq, Debug)pub(all) struct StructField {
name : String
ty : TypeExpr
mut_ : Bool
vis : Visibility
doc : DocComment
attrs : Array[Attribute]
} derive(Eq, Debug)pub(all) struct SuberrorDecl {
name : String
vis : Visibility
variants : Array[EnumVariant]
derives : Array[String]
} derive(Eq, Debug)pub(all) struct TraitDecl {
name : String
vis : Visibility
supers : Array[TypeExpr]
methods : Array[TraitMethod]
} derive(Eq, Debug)pub(all) enum TypeExpr {
Name(String)
Qualified(pkg~ : String, name~ : String)
Applied(base~ : TypeExpr, args~ : Array[TypeExpr])
Option(TypeExpr)
Tuple(Array[TypeExpr])
Arrow(args~ : Array[TypeExpr], ret~ : TypeExpr, error~ : ErrorSpec, is_async~ : Bool)
Object(TypeExpr)
Raw(String)
} derive(Eq, Debug)pub(all) struct UsingDecl {
pkg : String
entries : Array[String]
vis : Visibility
} derive(Eq, Debug)Install
Download zipReusable MoonBit code-generation library: naming, a backend-neutral source model, AST building, formatting and manifest emission.