| Type | Description |
|---|---|
| DartType | [CN] Dart 类型节点(13 变体:基础类型 + 容器 + Nullable + Future + Result + Custom) / [EN] Dart type node (13 variants) |
| DartExpr | [CN] Dart 表达式节点(12 变体:字面量/变量/方法调用/函数调用/二元/条件/switch/await/箭头/null) / [EN] Dart expression node (12 variants) |
| DartPattern | [CN] Dart 模式节点(7 变体:变量/整数/字符串/通配/null/构造器) / [EN] Dart pattern node (7 variants) |
| DartDecl | [CN] Dart 声明节点(5 变体:顶层函数/async 函数/class/sealed class/abstract class) / [EN] Dart declaration node (5 variants) |
| DartMethod | [CN] Dart 方法定义 / [EN] Dart method definition |
| DartVariant | [CN] Dart sealed class 变体 / [EN] Dart sealed class variant |
| Function | Signature | Description |
|---|---|---|
| DartType::to_moon_string | DartType -> String | [CN] Dart 类型 → MoonBit 类型字符串(aliased as dart_type_to_moon) / [EN] Dart type to MoonBit type string |
pub(all) enum DartDecl {
DTopFn(String, Array[String], Array[(String, DartType)], DartType, DartExpr)
DAsyncTopFn(String, Array[String], Array[(String, DartType)], DartType, DartExpr)
DClass(String, Array[String], Array[(String, DartType)], Array[DartMethod])
DSealedClass(String, Array[DartVariant])
DAbstractClass(String, Array[DartMethod])
} derive(Compare, Eq, Debug)pub(all) enum DartExpr {
DIntLit(Int)
DDoubleLit(Double)
DBoolLit(Bool)
DStringLit(String)
DVarRef(String)
DMethodCall(String, String, Array[DartExpr])
DFunctionCall(String, Array[DartExpr])
DBinOp(String, DartExpr, DartExpr)
DIfExpr(DartExpr, DartExpr, DartExpr)
DSwitchExpr(DartExpr, Array[(DartPattern, DartExpr)])
DAwaitExpr(DartExpr)
DArrowFn(Array[String], DartExpr)
DNullLit
} derive(Compare, Eq, Debug)pub(all) enum DartPattern {
DPVar(String)
DPInt(Int)
DPString(String)
DPWild
DPNull
DPCtor(String, Array[DartPattern])
} derive(Compare, Eq, Debug)Install
Download zipMoonBit → Dart transpiler — 让 MoonBit 代码跑在 Flutter 上