예제 #1
0
 /**
  * next Token method that allows you to control if whitespace and comments are returned as tokens.
  */
 public Token getNextToken(boolean returnComments, boolean returnWhiteSpace) throws IOException {
   Token t = getNextToken();
   while (t != null
       && ((!returnWhiteSpace && t.isWhiteSpace()) || (!returnComments && t.isComment()))) {
     t = getNextToken();
   }
   return (t);
 }