|
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 302 of file Protocol.h.
|
inline |
Definition at line 303 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 307 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 337 of file Protocol.h.
References character, llvm::SourceMgr::FindLocForLineAndColumn(), llvm::SourceMgr::getMainFileID(), and line.
Definition at line 323 of file Protocol.h.
References Position().
Definition at line 326 of file Protocol.h.
References character, line, and Position().
Definition at line 330 of file Protocol.h.
References character, line, and Position().
Definition at line 319 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 317 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 314 of file Protocol.h.
Referenced by getAsSMLoc(), operator<, operator<=, operator==, Position(), and Position().