A trivial interpreted programming language, just for fun 🐦
- C interpreter, which takes a file that ends in
.njs
- Read file content
- Parse content
- Execute the program
- variables declared with
let
and number of bytes (types are specified on use, lol) - functions, maybe with
fn
, and number of bytes in return! -
if
, cos we need branching baby -
indentation
decides scopes 😎 -
print
, cos that's the least we can do (it takes a template string, we need to decide how to print stuff) - +, -, *, / (these are enough)
So basically we can do loops by using recursion, and we are happy! 😀