by inserting it before we analyze statements, we allow ourselves to
analyze statements *with the data we already have*, for example, we can
now check the return statements' type, and see if it matches with the
functions' declared return type.
this is done via setting CompilationContext.cur_function on insertFn()
- don't just ignore function analysis if its incomplete, do an error