Skip to content

A tree-walking interpreter implemented in Golang for Lox, with a browser playground supported by WASM | 一个基于语法树的Lox解释器,附带WASM版本的playground

License

Notifications You must be signed in to change notification settings

nanmu42/bluelox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlueLox

English | 中文

GoDoc

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, 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

go install github.com/nanmu42/bluelox/cmd/bluelox@latest

To use as a prompt:

bluelox

To run a script file:

bluelox script.lox

Acknowledgement

Lox programing language and Crafting Interpreters are works by Robert Nystrom.

The Lox Playground borrows lots of ideas, code and styles from Go Playground.

Logo generated at Gopherize.me.

License

Copyright © 2022 LI Zhennan

Released under Apache License 2.0.

About

A tree-walking interpreter implemented in Golang for Lox, with a browser playground supported by WASM | 一个基于语法树的Lox解释器,附带WASM版本的playground

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project