I think pushing and popping off an indent stack will help clean up the "space_left" and various related logics.