This is a project to build a limited JavaScript parser and runtime in Rust, with a main goal of getting more comfortable with Rust as I go, refactoring as I learn more. I'm getting much more familiar with traits, generics, lifetimes, enums, and other Rust features that I'm finding also translate conceptually over to TypeScript as well. Eventually it will interact with a web app TypeScript React frontend that will display a parsed abstract syntax tree as well as actually run the JavaScript code users write.
At present, parsing for the abstract syntax tree is mostly complete for a simple set of javascript features, and I am currently working on the runtime part to actually run the code.
In this project I hope to/have learned a lot about JavaScript compiling/interpreting, program organization, just in time, data structures like binary expression trees and abstract syntax trees, the stack and heap, parsing, and lexing and how JavaScript and programming languages in general work under the hood. As one of my largest scale and longest-duration project to date, I've also really come to appreciate the critical importance of testing for the first time as something other than an afterthought, as well as organization and the use of comments to prevent things like rewriting code because you forget it already existed.