https://github.com/ryoga-exe/miniz
Minimal scripting language in Zig.
https://github.com/ryoga-exe/miniz
interpreter zig
Last synced: 11 months ago
JSON representation
Minimal scripting language in Zig.
- Host: GitHub
- URL: https://github.com/ryoga-exe/miniz
- Owner: Ryoga-exe
- License: apache-2.0
- Created: 2024-02-14T11:30:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-17T15:37:03.000Z (over 2 years ago)
- Last Synced: 2025-03-31T00:42:19.207Z (about 1 year ago)
- Topics: interpreter, zig
- Language: Zig
- Homepage:
- Size: 85 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# miniz
Minimal scripting language in Zig.
2023 年度筑波大学情報科学類で開講された [GB27001 ソフトウェアサイエンス特別講義 A](https://kdb.tsukuba.ac.jp/syllabi/2023/GB27001/jpn/0) の講義内で紹介された [minis](https://github.com/kmizu/minis) の Zig による実装です。
## 実行
### repl
```sh
zig build run
```
### file
```text
hello = 2023;
world = 2024;
hello + world;
```
```sh
zig build run -- file.mnz # 4047
```
## 文法
miniz は以下の文法をサポートしています。
- 関数定義
- 関数呼び出し
- if 式
- while 式
- 連結
- 代入式
- 比較演算子
- 四則演算・モジュロ演算