1 个不稳定版本

0.1.0 2024年8月14日

#7#子模块

自定义许可

4.5MB
104K SLoC

C 63K SLoC // 0.2% comments C++ 25K SLoC // 0.1% comments Python 3.5K SLoC // 0.2% comments M4 3K SLoC // 0.6% comments Happy 2.5K SLoC Bazel 2.5K SLoC // 0.1% comments XSL 1.5K SLoC // 0.1% comments D 856 SLoC // 0.3% comments Java 775 SLoC // 0.3% comments Shell 344 SLoC // 0.2% comments PowerShell 235 SLoC // 0.1% comments Rust 115 SLoC // 0.3% comments Batch 81 SLoC // 0.1% comments C# 50 SLoC Visual Studio Solution 16 SLoC CUDA 13 SLoC // 0.4% comments JavaScript 6 SLoC // 0.5% comments Bitbake 4 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

依赖项