File: lsRange.h

package info (click to toggle)
asymptote 2.85%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 43,264 kB
  • sloc: cpp: 210,491; ansic: 98,376; python: 14,568; javascript: 6,629; sh: 4,301; perl: 1,566; lisp: 1,505; makefile: 764; yacc: 554; lex: 446; xml: 182; objc: 177
file content (32 lines) | stat: -rw-r--r-- 941 bytes parent folder | download
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)