[fix] in special case, the last token is not an endl token