add a space before while of do-while closure so that it can parse the variable

No way...