protected void parseComment ( ) { int commentEndPos = sql . indexOf ( "*/" , position ) ; int commentEndPos2 = sql . indexOf ( "*#" , position ) ; if ( 0 < commentEndPos2 && commentEndPos2 < commentEndPos ) { commentEndPos = commentEndPos2 ; } if ( commentEndPos < 0 ) { throw new TwoWaySQLException ( String . format ( "%s is not closed with %s." , sql . substring ( position ) , "*/" ) ) ; } token = sql . substring ( position , commentEndPos ) ; nextTokenType = TokenType . SQL ; position = commentEndPos + 2 ; tokenType = TokenType . COMMENT ; }
Parse the comment .