LLVM 22.0.0git
|
#include "llvm/Support/LSP/Protocol.h"
Public Member Functions | |
Position (int line=0, int character=0) | |
Position (llvm::SourceMgr &mgr, SMLoc loc) | |
Construct a position from the given source location. | |
SMLoc | getAsSMLoc (llvm::SourceMgr &mgr) const |
Convert this position into a source location in the main file of the given source manager. |
Public Attributes | |
int | line = 0 |
Line position in a document (zero-based). | |
int | character = 0 |
Character offset on a line in a document (zero-based). |
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) |
Definition at line 288 of file Protocol.h.
|
inline |
Definition at line 289 of file Protocol.h.
References character, and line.
Referenced by operator!=, operator<, operator<=, and operator==.
|
inline |
Construct a position from the given source location.
Definition at line 293 of file Protocol.h.
References character, llvm::SourceMgr::getLineAndColumn(), and line.
|
inline |
Convert this position into a source location in the main file of the given source manager.
Definition at line 323 of file Protocol.h.
References character, llvm::SourceMgr::FindLocForLineAndColumn(), llvm::SourceMgr::getMainFileID(), and line.
Definition at line 309 of file Protocol.h.
References Position().
Definition at line 312 of file Protocol.h.
References character, line, and Position().
Definition at line 316 of file Protocol.h.
References character, line, and Position().
Definition at line 305 of file Protocol.h.
References character, line, and Position().
int llvm::lsp::Position::character = 0 |
Character offset on a line in a document (zero-based).
Definition at line 303 of file Protocol.h.
Referenced by getAsSMLoc(), operator<, operator<=, operator==, Position(), and Position().
int llvm::lsp::Position::line = 0 |
Line position in a document (zero-based).
Definition at line 300 of file Protocol.h.
Referenced by getAsSMLoc(), operator<, operator<=, operator==, Position(), and Position().