MLIR
20.0.0git
|
#include "mlir/Tools/lsp-server-support/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. More... | |
SMLoc | getAsSMLoc (llvm::SourceMgr &mgr) const |
Convert this position into a source location in the main file of the given source manager. More... | |
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) |
Definition at line 278 of file Protocol.h.
|
inline |
Definition at line 279 of file Protocol.h.
|
inline |
Construct a position from the given source location.
Definition at line 283 of file Protocol.h.
|
inline |
Convert this position into a source location in the main file of the given source manager.
Definition at line 313 of file Protocol.h.
References character, and line.
Referenced by mlir::lsp::Range::getAsSMRange().
Definition at line 299 of file Protocol.h.
Definition at line 302 of file Protocol.h.
Definition at line 306 of file Protocol.h.
Definition at line 295 of file Protocol.h.
int mlir::lsp::Position::character = 0 |
Character offset on a line in a document (zero-based).
Definition at line 293 of file Protocol.h.
Referenced by mlir::lsp::fromJSON(), getAsSMLoc(), getLocationFromLoc(), mlir::lsp::operator<<(), Position(), and mlir::lsp::toJSON().
int mlir::lsp::Position::line = 0 |
Line position in a document (zero-based).
Definition at line 290 of file Protocol.h.
Referenced by mlir::lsp::fromJSON(), getAsSMLoc(), getLocationFromLoc(), mlir::lsp::operator<<(), Position(), and mlir::lsp::toJSON().