Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nanmu42/bluelox
A tree-walking interpreter implemented in Golang for Lox, with a browser playground supported by WASM | 一个基于语法树的Lox解释器,附带WASM版本的playground
https://github.com/nanmu42/bluelox
ast golang interpreter lox lox-language parser playground scripting-language
Last synced: 4 months ago
JSON representation
A tree-walking interpreter implemented in Golang for Lox, with a browser playground supported by WASM | 一个基于语法树的Lox解释器,附带WASM版本的playground
- Host: GitHub
- URL: https://github.com/nanmu42/bluelox
- Owner: nanmu42
- License: apache-2.0
- Created: 2021-05-05T13:47:05.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-14T03:08:49.000Z (almost 2 years ago)
- Last Synced: 2024-10-03T12:35:47.800Z (4 months ago)
- Topics: ast, golang, interpreter, lox, lox-language, parser, playground, scripting-language
- Language: Go
- Homepage: https://lox.nanmu.me
- Size: 346 KB
- Stars: 40
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# BlueLox
**English** | [中文](https://github.com/nanmu42/bluelox/blob/master/README_ZH.md)
[![GoDoc](https://godoc.org/github.com/nanmu42/bluelox?status.svg)](https://godoc.org/github.com/nanmu42/bluelox)
BlueLox is a tree-walking interpreter implemented in Golang for Lox.
Lox is a programing language by Robert Nystrom,
introduced in his wonderful book [Crafting Interpreters](https://craftinginterpreters.com/),
where he constructs a Java version interpreter(jlox) line by line,
with detailed tutorial, brilliant illustrations and a full pack of jokes about breakfast.## Lox Playground
https://lox.nanmu.me/
A web browser based Lox playground powered by WASM version of BlueLox.
You may find the Lox Playground helpful during your learning and coding as it may be your stage
for trial-and-error and implementation reference.## CLI
```bash
go install github.com/nanmu42/bluelox/cmd/bluelox@latest
```To use as a prompt:
```bash
bluelox
```To run a script file:
```bash
bluelox script.lox
```## Acknowledgement
Lox programing language and [Crafting Interpreters](https://craftinginterpreters.com/)
are works by [Robert Nystrom](https://twitter.com/intent/user?screen_name=munificentbob).The Lox Playground borrows lots of ideas, code and styles from [Go Playground](https://go.dev/play/).
Logo generated at [Gopherize.me](https://gopherize.me).
## License
Copyright © 2022 LI Zhennan
Released under Apache License 2.0.