Is it necessary to flatten everything in a single commit? Or could we e.g. first do IF/ELSE/ENDIF, then LOOP/ENDLOOP/BREAK/CONTINUE, SWITCH/ENDSWITCH/CASE/etc.?
IMHO in this specific case splitting commits creates more complexity rather than reducing it, mostly because the intermediate steps do not make much sense. For example, if on 4/7 I try to compile this pseudo-code: ```c float4 main(float4) { for (...) { if (...) { do_something(); } } } ``` then the selection construct will cause the loop body to be split in different blocks. In particular, the `loop` and `endloop` will end up in different blocks, which doesn't make a lot of sense to me, even syntactically.
This could be worked around by not translating constructs that appear inside the body of an outer construct which is not itself translated yet in intermediate versions. However, to me, the easiest way to check that the modifications Conor is doing are sensible is to verify the new version from scratch, which is not that difficult even if it's a lot of lines, because the code is well structured and relatively straightforward. Having more commits is more complicated because then I have to check the intermediate versions too (and, as I said, I'm not even sure of what they're supposed to do anyway). Since is very short lived code anyway, I'll just check the final version (or, rather, I already did that).
All of this is just to explain my thought process. To be clear, I am not requesting other modifications to the code, checking the final version is enough for me.