private static void close_marker_impl_(Frame frame, PsiBuilder.Marker marker, IElementType elementType, boolean result) {
    if (marker == null) return;
    if (result) {
      if (elementType != null) {
        marker.done(elementType);
      }
      else {
        marker.drop();
      }
    }
    else {
      if (frame != null) {
        int position = marker.getStartIndex();
        if (frame.errorReportedAt > position) {
          frame.errorReportedAt = frame.parentFrame == null ? -1 : frame.parentFrame.errorReportedAt;
        }
      }
      marker.rollbackTo();
    }
  }
private static void close_marker_impl_(Frame frame, PsiBuilder.Marker marker, IElementType elementType, boolean result)