summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/Protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/Protocol.h')
-rw-r--r--clang-tools-extra/clangd/Protocol.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/Protocol.h b/clang-tools-extra/clangd/Protocol.h
index d244febfce4..6540365dccd 100644
--- a/clang-tools-extra/clangd/Protocol.h
+++ b/clang-tools-extra/clangd/Protocol.h
@@ -30,6 +30,7 @@
#include "llvm/Support/JSON.h"
#include "llvm/Support/raw_ostream.h"
#include <bitset>
+#include <memory>
#include <string>
#include <vector>
@@ -1222,6 +1223,28 @@ struct SemanticHighlightingParams {
};
llvm::json::Value toJSON(const SemanticHighlightingParams &Highlighting);
+struct SelectionRangeParams {
+ /// The text document.
+ TextDocumentIdentifier textDocument;
+
+ /// The positions inside the text document.
+ std::vector<Position> positions;
+};
+bool fromJSON(const llvm::json::Value &, SelectionRangeParams &);
+
+struct SelectionRange {
+ /**
+ * The range of this selection range.
+ */
+ Range range;
+ /**
+ * The parent selection range containing this range. Therefore `parent.range`
+ * must contain `this.range`.
+ */
+ std::unique_ptr<SelectionRange> parent;
+};
+llvm::json::Value toJSON(const SelectionRange &);
+
} // namespace clangd
} // namespace clang
OpenPOWER on IntegriCloud