public Token nextLine(){
  if (!hasNextLine())   throw new IllegalStateException("No more lines found!");
  int indexOfNewline=remaining.indexOf('\n');
  if (indexOfNewline == -1) {
    indexOfNewline=content.length() - currentPosition;
  }
  Token token=new Token(this,currentPosition,currentPosition + indexOfNewline);
  stepForward(indexOfNewline + 1);
  return token;
}

public Token nextLine ( ) { if ( ! hasNextLine ( ) ) throw new IllegalStateException ( "No more lines found!" ) ; int indexOfNewline = remaining . indexOf ( '\n' ) ; if ( indexOfNewline == - 1 ) { indexOfNewline = content . length ( ) - currentPosition ; } Token token = new Token ( this , currentPosition , currentPosition + indexOfNewline ) ; stepForward ( indexOfNewline + 1 ) ; return token ; }
returns the current text , up to the next newline / end , stepping forward the tokenizer to the next line .
