https://github.com/mrdvince/rmon
An interpreter in Rust
https://github.com/mrdvince/rmon
book interpreter knock-myself-out language programming-language repl rust
Last synced: 10 months ago
JSON representation
An interpreter in Rust
- Host: GitHub
- URL: https://github.com/mrdvince/rmon
- Owner: mrdvince
- License: mit
- Created: 2022-11-06T03:15:57.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-09-24T15:51:06.000Z (over 2 years ago)
- Last Synced: 2025-02-03T14:45:48.106Z (12 months ago)
- Topics: book, interpreter, knock-myself-out, language, programming-language, repl, rust
- Language: Rust
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rmon
An interpreter in Rust
> Following Writing an Interpreter in Go Book by Thorsten Bal
## Prerequisite
Install Rust https://www.rust-lang.org/tools/install
## Getting started
Clone the repo and cd into the repo
```bash
git clone https://github.com/mrdvince/rmon.git
cd rmon
```
## Run
```bash
cargo -q run
Hello vince! This is the..I have no idea what this is tbh!!
Feel to start typing
>>let add = fn(x, y) { x + y; };
Token { type: "LET", literal: "let" }
Token { type: "IDENT", literal: "add" }
Token { type: "=", literal: "=" }
Token { type: "FUNCTION", literal: "fn" }
Token { type: "(", literal: "(" }
Token { type: "IDENT", literal: "x" }
Token { type: ",", literal: "," }
Token { type: "IDENT", literal: "y" }
Token { type: ")", literal: ")" }
Token { type: "{", literal: "{" }
Token { type: "IDENT", literal: "x" }
Token { type: "+", literal: "+" }
Token { type: "IDENT", literal: "y" }
Token { type: ";", literal: ";" }
Token { type: "}", literal: "}" }
Token { type: ";", literal: ";" }
```
...