aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/syntax-highlighting/src/lib/foldingregion.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/3rdparty/syntax-highlighting/src/lib/foldingregion.h')
-rw-r--r--src/libs/3rdparty/syntax-highlighting/src/lib/foldingregion.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/libs/3rdparty/syntax-highlighting/src/lib/foldingregion.h b/src/libs/3rdparty/syntax-highlighting/src/lib/foldingregion.h
index ca4cacafb25..e2a9e1fc680 100644
--- a/src/libs/3rdparty/syntax-highlighting/src/lib/foldingregion.h
+++ b/src/libs/3rdparty/syntax-highlighting/src/lib/foldingregion.h
@@ -22,7 +22,7 @@ public:
* Defines whether a FoldingRegion starts or ends a folding region.
*/
enum Type {
- //! Used internally as indicator for invalid FoldingRegion%s.
+ //! Used internally as indicator for an invalid FoldingRegion.
None,
//! Indicates the start of a FoldingRegion.
Begin,
@@ -64,7 +64,7 @@ public:
* brace, you need to do kind of a reference counting to find the correct
* closing brace.
*/
- quint16 id() const;
+ int id() const;
/**
* Returns whether this is the begin or end of a region.
@@ -74,12 +74,21 @@ public:
*/
Type type() const;
+ /**
+ * Returns the matching start or end region.
+ *
+ * @note Will return invalid region for an invalid region.
+ *
+ * @since 6.0
+ */
+ FoldingRegion sibling() const;
+
private:
friend class Rule;
- FoldingRegion(Type type, quint16 id);
+ KSYNTAXHIGHLIGHTING_NO_EXPORT FoldingRegion(Type type, int id);
- quint16 m_type : 2;
- quint16 m_id : 14;
+ // 0 is invalid, positive begin, negative end
+ int m_idWithType = 0;
};
}