Last few weekends have been quite fun namely because of my new cat Rubi but also because I spent a good amount of time working on implementing enumeration types and also strict types in my compiler.
One of the more satisfying parts is working on the code-generation and type-checking. This stage works through a dependency-graph of AST nodes (for the most part; it isn't a one-to-one relation but more a one-to-many) and then generates instructions and typechecks them. This process entails a lot of embedding, stack pushes-and-pops and a queue (so basically a stack-queue or "deque").
What you generate, however, is independent (or at least it is in a good compiler) of the actual code you emit. This intermediate form (TIR) is quite fun to design, therefore I documented some of it just to give those interested in compiler implementation an idea of one of the many ways to go about these things, hos one can use them and so forth.
https://deavmi.assigned.network/projects/tlang/implementation/40-instructions/