I'm going to try and document progress for WoGo and keep an index of entries here, but no promises.
So much code duplication. I'm working on bringing and experimental branch into main where I deduped a lot of code. Parser and Compiler does a lot of the same work, and after doing some reading about how LLVM works, I figured out I needed an intermediate step between WAT and WASM generation.
The ir module contains the itermediate representation the process. Pretty much a token translation that's ready to be processed into WAT or WASM format. From my reading on [Wikipedia](https://en.wikipedia.org/wiki/Intermediate_representation), I am moving in the right direction, more or less.
Constants! I've been wanting to get to this for a while now, it's something I will need for the porject I'm working on. After trying a few different angles, I did some more reading and it seems the simplest way to handle them is to just literally paste them into every place they are referenced. No pointers, no references, just paste the constant right there in the code. Simple, and it works! Busy implementing that, though it sounds easier than it is to do, I feel this will help me move forward.
Been working on impriving how tests work. Up until now, they could only be in a flat directory, no structure. I've switched to walking the directory and any sub-directories when running all the tests. So I can structure tests a bit better and group them in directories. The idea is to be able to run all tests at once, by just giving the root dir, or just a pack of tests by giving their sub-dir. Of course running individual tests still work. Testing is hard work, but it's already saved my bacon a few times.
Spent some time this morning to make the repo public, yeah! And then I realised I never made provision for functions that take no arguments at all and added a simple test which showed my test framework couldn't handle it. Nor could the compiler.
I see on Mozilla, as I suspected, that wasm doesn't have a bool. Instead, it seems using 0 and 1 is the way to go, like back in my old C days.