private final boolean skip_whitespace ( CommentStrategy commentStrategy ) throws IOException { boolean any_whitespace = false ; int c ; loop : for ( ; ; ) { c = read_char ( ) ; switch ( c ) { case - 1 : break loop ; case ' ' : case ' ' : // new line normalization and counting is handled in read_char case CharacterSequence . CHAR_SEQ_NEWLINE_SEQUENCE_1 : case CharacterSequence . CHAR_SEQ_NEWLINE_SEQUENCE_2 : case CharacterSequence . CHAR_SEQ_NEWLINE_SEQUENCE_3 : case CharacterSequence . CHAR_SEQ_ESCAPED_NEWLINE_SEQUENCE_1 : case CharacterSequence . CHAR_SEQ_ESCAPED_NEWLINE_SEQUENCE_2 : case CharacterSequence . CHAR_SEQ_ESCAPED_NEWLINE_SEQUENCE_3 : any_whitespace = true ; break ; case ' ' : if ( ! commentStrategy . onComment ( this ) ) { break loop ; } any_whitespace = true ; break ; default : break loop ; } } unread_char ( c ) ; return any_whitespace ; }
Skips whitespace and applies the given CommentStrategy to any comments found . Finishes at the starting position of the next token .