private HtmlToken collapseSubsequent(HtmlToken token) {
    HtmlToken collapsed = token;
    for (HtmlToken next;
         (next= peekToken(0)) != null && next.type == token.type;
         readToken()) {
      collapsed = join(collapsed, next);
    }
    return collapsed;
  }
private HtmlToken collapseSubsequent ( HtmlToken token ) { HtmlToken collapsed = token ; for ( HtmlToken next ; ( next = peekToken ( 0 ) ) != null && next . type == token . type ; readToken ( ) ) { collapsed = join ( collapsed , next ) ; } return collapsed ; }
Collapses all the following tokens of the same type into this.token.