MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / Range

Class Range

CodeFormatServer/src/LSP/LSP.h:69–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67};
68
69class Range : public Serializable {
70public:
71 Range(Position _start = Position(0, 0), Position _end = Position(0, 0));
72 Position start;
73 Position end;
74
75 nlohmann::json Serialize() override;
76 void Deserialize(nlohmann::json json) override;
77
78 bool operator==(const Range &range) const {
79 return start == range.start && end == range.end;
80 }
81
82 bool operator<(const Range &rhs) const {
83 if (start != rhs.start) {
84 return start < rhs.start;
85 } else {
86 return end < rhs.end;
87 }
88 }
89};
90
91class Location : public Serializable {
92public:

Callers 6

OnFormattingMethod · 0.70
OnRangeFormattingMethod · 0.70
OnTypeFormattingMethod · 0.70
DeserializeMethod · 0.70
ReformatMethod · 0.50
DiagnosticMethod · 0.50

Calls 1

PositionClass · 0.70

Tested by

no test coverage detected