| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "LibLsp/JsonRpc/serializer.h" |
| 4 |
|
| 5 |
#include <string> |
| 6 |
#include <vector> |
| 7 |
#include "lsPosition.h" |
| 8 |
//A range in a text document expressed as(zero - based) startand end positions. |
| 9 |
//A range is comparable to a selection in an editor.Therefore the end position is exclusive. |
| 10 |
//If you want to specify a range that contains a line including the line ending character(s) |
| 11 |
//then use an end position denoting the start of the next line. |
| 12 |
struct lsRange |
| 13 |
{ |
| 14 |
lsRange(); |
| 15 |
lsRange(lsPosition start, lsPosition end); |
| 16 |
|
| 17 |
bool operator==(lsRange const& other) const; |
| 18 |
bool operator<(lsRange const& other) const; |
| 19 |
/** |
| 20 |
* The range's start position. |
| 21 |
*/ |
| 22 |
lsPosition start; |
| 23 |
/** |
| 24 |
* The range's end position. |
| 25 |
*/ |
| 26 |
lsPosition end; |
| 27 |
std::string ToString() const; |
| 28 |
MAKE_SWAP_METHOD(lsRange, start, end) |
| 29 |
}; |
| 30 |
|
| 31 |
MAKE_REFLECT_STRUCT(lsRange, start, end) |