If you want and I find time, I volunteer to start this in parallel to my
coding; but I think for that I need at least a good reviewer as I'm not
myself a guru on this topic :) Additionally, if you think that's a good
idea, I could write builder-functions (maybe in a new code file
build-tree.c); for instance, given a code-block and a condition, build a
complete (resolved?) IF-gfc_code block; and similar for other constructs and
expressions (build a less-than expression given two operands or a
function-call given the list of actual argument expressions and the
symbl/symtree/name. These could serve both as a secondary documentation on
how such an expression really looks like and be used to combine this logic
where it's used in the code (during parsing and at places like my
finalization routines during resolution).
This is done, of course, in the parser. Whether it would be
worthwhile to extract builder functions from the parser, both for
maintainability and clarity, I do not know. This is effictively done
in array.c and arith.c.