|
LLVM 23.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 297 of file Protocol.h.
|
inline |
Definition at line 298 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 302 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 332 of file Protocol.h.
References character, llvm::SourceMgr::FindLocForLineAndColumn(), llvm::SourceMgr::getMainFileID(), and line.
Definition at line 318 of file Protocol.h.
References Position().
Definition at line 321 of file Protocol.h.
References character, line, and Position().
Definition at line 325 of file Protocol.h.
References character, line, and Position().
Definition at line 314 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 312 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 309 of file Protocol.h.
Referenced by getAsSMLoc(), operator<, operator<=, operator==, Position(), and Position().