clang-tools  10.0.0svn
Public Attributes | Friends | List of all members
clang::clangd::Position Struct Reference

#include <Protocol.h>

Collaboration diagram for clang::clangd::Position:
Collaboration graph
[legend]

Public Attributes

int line = 0
 Line position in a document (zero-based). More...
 
int character = 0
 Character offset on a line in a document (zero-based). More...
 

Friends

bool operator== (const Position &LHS, const Position &RHS)
 
bool operator!= (const Position &LHS, const Position &RHS)
 
bool operator< (const Position &LHS, const Position &RHS)
 
bool operator<= (const Position &LHS, const Position &RHS)
 

Detailed Description

Definition at line 127 of file Protocol.h.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const Position LHS,
const Position RHS 
)
friend

Definition at line 140 of file Protocol.h.

◆ operator<

bool operator< ( const Position LHS,
const Position RHS 
)
friend

Definition at line 143 of file Protocol.h.

◆ operator<=

bool operator<= ( const Position LHS,
const Position RHS 
)
friend

Definition at line 147 of file Protocol.h.

◆ operator==

bool operator== ( const Position LHS,
const Position RHS 
)
friend

Definition at line 136 of file Protocol.h.

Member Data Documentation

◆ character

int clang::clangd::Position::character = 0

Character offset on a line in a document (zero-based).

WARNING: this is in UTF-16 codepoints, not bytes or characters! Use the functions in SourceCode.h to construct/interpret Positions.

Definition at line 134 of file Protocol.h.

Referenced by clang::clangd::isRangeConsecutive(), clang::clangd::offsetToPosition(), and clang::clangd::positionToOffset().

◆ line

int clang::clangd::Position::line = 0

Line position in a document (zero-based).

Definition at line 129 of file Protocol.h.

Referenced by clang::clangd::isRangeConsecutive(), clang::clangd::offsetToPosition(), and clang::clangd::positionToOffset().


The documentation for this struct was generated from the following file: