# Cinderella
Cinderella language and its compiler, built with LLVM.
## How to use on MacOS?
#### Caveats:
* Only support **LLVM 10**;
* LLVM should be compiled beforehand by yourself;
#### Build source code with CMake:
```shell
# Config CMake (the placeholder {YOUR_LLVM_DIR} shoule be replaced by your LLVM folder);
cd build && LLVM_BUILT_DIR="{YOUR_LLVM_DIR}" cmake ..
# Compile;
make -j 4
# Or dynamically using multiple cores:
make -j $(nproc)
```
#### Run Compiler in Command Line:
```shell
# REPL mode;
./cinderella
# Compiling mode (try build/sources);
./cinderella <source.hs> -o <output.o>
# Compile source file into WebAssembly binary module (.wasm):
./cinderella <source.hs> -t WASM -o <output.wasm>
```
#### Sample Code:
```hangScript
def add(x, y) x + y;
def average(x, y) (x + y) / 2;
```
灰姑娘:(演示)灰姑娘语言及其编译器(* .hs),可以将其编译为WebAssembly二进制格式
需积分: 0 35 浏览量
2021-02-02
13:41:37
上传
评论
收藏 21KB ZIP 举报
mckaywrigley
- 粉丝: 30
- 资源: 4718
最新资源
- Python 程序语言设计模式思路-行为型模式:策略模式:将算法封装成独立的类,并使它们可以互相替换及支付模式数据压缩
- main.py
- Last Loaded Test.DBK
- Screenshot_20240520_163011.jpg
- ubuntu-python3-whisper-tornado docker镜像 Dockerfile
- ubuntu-python3-whisper-tornado docker镜像07
- 新录音 8.m4a
- ubuntu-python3-whisper-tornado docker镜像
- ubuntu-python3-whisper-tornado docker镜像
- ubuntu-python3-whisper-tornado docker镜像09
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0