Skip to content

mrdvince/rmon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

32cfe15 · Sep 24, 2023

History

40 Commits
Sep 24, 2023
Aug 20, 2023
Jun 6, 2023
Aug 19, 2023
Nov 7, 2022
Aug 20, 2023

Repository files navigation

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

  git clone https://github.com/mrdvince/rmon.git
  cd rmon

Run

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: ";" }

...