WHILE code generation. Works towards #36