Add for/while support (#12600) 

Change-Id: I66af7dfa57632ec539ffe6e6c0ece08919bbc87b