1 个不稳定版本
新 0.1.0 | 2024年8月14日 |
---|
#7 在 #子模块
4.5MB
104K SLoC
包含 (WOFF字体,24KB) glyphicons-halflings-regular.woff
gs2-parser
这是一个用于Graal Script 2 (GS2)语言的编译器。
先决条件
在构建之前,请克隆仓库并递归克隆子模块
git clone [email protected]:xtjoeytx/gs2-parser.git --recursive
构建
您可以使用CMake构建项目
mkdir build
cd build
cmake ..
make -j $(nproc)
构建(Wasm)
首先,请确保您已安装Emscripten。然后,您可以使用CMake构建项目
mkdir build
cd build
emcmake cmake ..
make -j $(nproc)
生成的gs2test.js
文件可以导入到网页中。
运行
可以使用以下命令运行非Wasm构建
$ ./gs2test ../scripts/asd2.txt
Argc: 2
Args: ../scripts/asd2.txt
Compiling file ../scripts/asd2.txt
Compiled in 0.001322 seconds
-> saved to ../scripts/asd2.gs2bc
Total length of bytecode w/ headers: 160