Making a compiler (ep 9) Adding while-loops be eaASY
#devlog #g1ant #adventiredOfG1ant #programming #csharp
This was a feature I didn’t add because I just imagined it would be done in an hour or so.
Oh how I was wrong. It took me FULL 90 MINUTES!
What took the most time was writing all those stupid unit tests. Implementing
do-while was arguably the easiest thing I’ve added. With my UNQUESTIONABLY SENSATIONALISTIC CODE BASE it was added in a jiffy. 🍆✊💦
That right there ^ was like, echo conditional jump, echo codeblock, echo label, DDdddDDONE!
Also, check out this sicc™ mini optimization:
Which in turns combined with a prefix operator makes this little loop super cool:
I should reaaaally make a roadmap for planned features tho… I’m starting to procrastinate,,, which is bhaaaad. Like I really need to implement that variable type check, but it’s such a big hurdle D:::
Go nail yo’shelf,,,´,,,,,
This post was originally posted (by me) here: https://itsa-me-jag.tumblr.com/post/172898361427/making-a-compiler-ep-9-adding-while-loops-be