In my goal to learn how language parsers and compilers work, I tried to adapt the-super-tiny-compiler to TypeScript so that I could get to a point where you can describe the compiler in TypeScript types and Interfaces. The compiler is divided into four sections:
Tokenizer
Parser
Transformer
Code Generator
There are a tons more notes about it in my Notion page. Because this was such a documentation heavy project (I wanted to document and write about everything), I opted for making a Notion page: https://www.notion.so/sammynotes/the-super-tiny-compiler-e4ca7985c999431a840b6561d0a1c03e