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