MoonBit → Dart transpiler — 让 MoonBit 代码跑在 Flutter 上
///|
let prog = [
@ast.DFn(
"add",
[("a", @ast.MInt), ("b", @ast.MInt)],
@ast.MInt,
@ast.EBinOp("+", @ast.EVar("a"), @ast.EVar("b")),
),
]
///|
let dart_code = @moon2dart.transpile(prog)fn reverse_transpile_source(src : String) -> Stringfn transpile_source(src : String) -> Stringfn transpile_source_flutter(src : String) -> Stringfn transpile_source_pure(src : String) -> Stringfn transpile_source_with_lib(src : String, lib_name : String) -> StringInstall
Download zipMoonBit → Dart transpiler — 让 MoonBit 代码跑在 Flutter 上