private void closeDanglingSuitesWithComments(int indent, int whiteSpaceStart) {
    int lastIndent = myIndentStack.topInt();

    int insertIndex = myLineBreakBeforeFirstCommentIndex == -1 ? myTokenQueue.size() : myLineBreakBeforeFirstCommentIndex;
    int lastSuiteIndent;
    while (indent < lastIndent) {
      lastSuiteIndent = myIndentStack.popInt();
      lastIndent = myIndentStack.topInt();
      int dedentOffset = whiteSpaceStart;
      if (indent > lastIndent) {
        myTokenQueue.add(new PendingToken(PyTokenTypes.INCONSISTENT_DEDENT, whiteSpaceStart, whiteSpaceStart));
        insertIndex = myTokenQueue.size();
      }
      else {
        insertIndex = skipPrecedingCommentsWithSameIndentOnSuiteClose(lastSuiteIndent, insertIndex);
      }
      if (insertIndex != myTokenQueue.size()) {
        dedentOffset = myTokenQueue.get(insertIndex).getStart();
      }
      myTokenQueue.add(insertIndex, new PendingToken(PyTokenTypes.DEDENT, dedentOffset, dedentOffset));
      insertIndex++;
    }
  }
private void closeDanglingSuitesWithComments(int indent, int whiteSpaceStart)