I made my own programming language clox from scratch Lox in C. It is a compiled and interpreted language.
It has dynamic typing. It has expressions and scopes, global variables and local variables.
This gets compiled to bytecode and looks like this:
Then it gets executed by the virtual machine which is a stack based machine, you can see the stack grow (variables in brackets) when constants are pushed into the stack by operation OP_CONSTANT:
If you want to look at the code:
No comments:
Post a Comment