diff options
author | Norbert Preining <norbert@preining.info> | 2022-09-18 03:08:21 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-09-18 03:08:21 +0000 |
commit | baa3e10650110291de10e0e8e6a1e48ac4579afe (patch) | |
tree | 8eff974515ba91e538c94002db56558182e59a4e /graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h | |
parent | 9ae94dce28ea17b97ef24019e324353cd6af4dba (diff) |
CTAN sync 202209180308
Diffstat (limited to 'graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h')
-rw-r--r-- | graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h index 8c2106e16e..a14d75ed90 100644 --- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h +++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/lsPosition.h @@ -11,30 +11,30 @@ //A position is between two characters like an ¡®insert¡¯ cursor in a editor.Special values like //for example - 1 to denote the end of a line are not supported. struct lsPosition { - lsPosition(); - lsPosition(int line, int character); - - bool operator==(const lsPosition& other) const; - bool operator<(const lsPosition& other) const; - - std::string ToString() const; - - /** - * Line position in a document (zero-based). - */ - // Note: these are 0-based. - unsigned line = 0; - /** - * Character offset on a line in a document (zero-based). Assuming that - * the line is represented as a string, the `character` value represents - * the gap between the `character` and `character + 1`. - * - * If the character value is greater than the line length it defaults back - * to the line length. - */ - unsigned character = 0; - static const lsPosition kZeroPosition; - - MAKE_SWAP_METHOD(lsPosition, line, character) + lsPosition(); + lsPosition(int line, int character); + + bool operator==(const lsPosition& other) const; + bool operator<(const lsPosition& other) const; + + std::string ToString() const; + + /** + * Line position in a document (zero-based). + */ + // Note: these are 0-based. + unsigned line = 0; + /** + * Character offset on a line in a document (zero-based). Assuming that + * the line is represented as a string, the `character` value represents + * the gap between the `character` and `character + 1`. + * + * If the character value is greater than the line length it defaults back + * to the line length. + */ + unsigned character = 0; + static const lsPosition kZeroPosition; + + MAKE_SWAP_METHOD(lsPosition, line, character) }; -MAKE_REFLECT_STRUCT(lsPosition, line, character);
\ No newline at end of file +MAKE_REFLECT_STRUCT(lsPosition, line, character); |