private void processComment(){
  templateReader.nextCharacter();
  if (templateReader.startsWith(syntax.getDocumentTypeOpening())) {
    processSchemaComment();
    return;
  }
 else   if (nestedComments) {
    processNestedComment();
    return;
  }
  while (templateReader.hasNextCharacter()) {
    final char commentCharacter=templateReader.nextCharacter();
    if (isCommentClosingMarker(commentCharacter) && templateReader.hasNextCharacter() && templateReader.peekCharacter() == syntax.getTagClosing()) {
      templateReader.nextCharacter();
      break;
    }
  }
}

private void processComment ( ) { templateReader . nextCharacter ( ) ; if ( templateReader . startsWith ( syntax . getDocumentTypeOpening ( ) ) ) { processSchemaComment ( ) ; return ; } else if ( nestedComments ) { processNestedComment ( ) ; return ; } while ( templateReader . hasNextCharacter ( ) ) { final char commentCharacter = templateReader . nextCharacter ( ) ; if ( isCommentClosingMarker ( commentCharacter ) && templateReader . hasNextCharacter ( ) && templateReader . peekCharacter ( ) == syntax . getTagClosing ( ) ) { templateReader . nextCharacter ( ) ; break ; } } }
found an open tag starting with comment sign . burning through characters up to the comment ' s end .
