This project is an interactive, browser-based implementation of an interpreter implemented in C.
🧑💻 Try it out now: Live Demo
- Write and Execute: Run code directly in your browser.
- Dynamic Feedback: View program output or errors instantly.
- Examples at Your Fingertips: Select from built-in code snippets to get started quickly.
This project can be built in two ways:
If you'd like to run the interpreter locally on your machine:
- Make sure you have a C compiler and
make - Simply run
make
This will allow you to execute programs directly from your terminal.
If you'd like to run the interpreter in the browser, follow these steps:
-
Install Emscripten and make
-
Build the WebAssembly module using the
lox.jstarget in theMakefile:emmake make lox.js
-
Start a local fileserver e.g.:
python -m http.server
This step is needed because not all browsers support
file://XHR requesets -
Open
http://localhost:8000/in your browser
- Inspired by Crafting Interpreters by Bob Nystrom.
- Built using modern web technologies and WebAssembly.
⭐ Don't forget to check out the Live Demo! ⭐