Skip to content

oboard/moonrepl

Repository files navigation

MoonRepl

MoonBit Interpreter (Unofficial)

MoonRepl is an interpreter for the MoonBit programming language. It is an unofficial implementation of the MoonBit programming language. It is written in TypeScript.

Try

Online (Recommended)

https://moonrepl.oboard.eu.org/

Local

  1. Clone the repository
git clone https://github.com/oboard/moonrepl.git
  1. Install dependencies
bun install # or npm install or yarn install or pnpm install
  1. Start the program

Run .ts file with Deno or Bun.js

bun entry.ts # Recommended
deno run --allow-read --allow-write --unstable-sloppy-imports --allow-env

MoonRepl Preview Image

Features

  • Addition Expressions 加法运算
  • Subtraction Expressions 减法运算
  • Multiplication Expressions 乘法运算
  • Division Expressions 除法运算
  • Comparison Expressions 比较运算
  • Let Statement 变量声明
  • Let Mut Statement 变量声明(可变)
  • Strict Mode 严格模式
  • Template String 模板字符串
  • Basic Types (Int, Double, String, Bool, Char) 基本类型
  • Function Types 函数类型
  • If Statement If 语句
  • Types Check 类型检查
  • Multiline Input 多行输入
  • Functions 函数
  • While Statement While 循环
  • For Statement For 循环
  • For Else 循环的Else
  • Comment 注释
  • Enum 枚举
  • Struct 结构体
  • Derive 派生
  • Pipeline 管道运算符
  • Trait 特征
  • Trait Function 特征函数
  • Trait Type Check 特征类型检查
  • Trait Inheritance 特征继承
  • Trait Default Implementations 特征默认实现
  • Array 数组
  • Json 序列化
  • Match Statement 模式匹配
  • Match Statement 模式匹配

Releases

No releases published

Packages

No packages published

Languages