parse if statement and while statement