code to handle unexpected token error