Interpreter in Typescript
I am working on an interpreter written in typescript. It's still far from usable, but it works a little bit. You can see it here. It can do variables (but no lifetimes or anything fancy and const doesn't do anything) and if statements. It also supports most of JavaScript's operators.
🎉Update🎉 I focused my efforts on parsing rather than interpreting. I changed the parser so it could parse any syntax we need using simple rules and abstract all the complexities from some lines of code having multiple valid interpretations. This also means I broke the runtime, so now we can only create an AST and not run it, but the runtime should not be too hard to fix.
We can now parse quite a lot of things, including that when we have 1, we parse it as both the number 1 and a variable named '1'.