var token; while(true){ token = tokenizer.readToken(); if(typeof token === "undefined"){ break; } }