nixd
|
A point in the source file. More...
#include <Range.h>
Public Member Functions | |
LexerCursor ()=default | |
LexerCursor (const LexerCursor &)=default | |
LexerCursor & | operator= (const LexerCursor &)=default |
LexerCursor (LexerCursor &&)=default | |
bool | isAt (int64_t Line, int64_t Column, std::size_t Offset) const |
Check if the point is at the given position. | |
int64_t | line () const |
Line number, starting from 0. | |
int64_t | column () const |
Column number, starting from 0. | |
Position | position () const |
Position in the source file. (Line + Column ) | |
std::size_t | offset () const |
Offset in the source file, starting from 0. | |
Static Public Member Functions | |
static LexerCursor | unsafeCreate (int64_t Line, int64_t Column, std::size_t Offset) |
Create a cursor at the given position. (Line, Column, Offset) | |
Friends | |
class | Lexer |
bool | operator== (const LexerCursor &LHS, const LexerCursor &RHS) |
A point in the source file.
This class is used to represent a point in the source file. And it shall be constructed by Lexer, to keep Line & Column information correct.
|
default |
|
default |
|
default |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
|
inlinenodiscard |
Offset in the source file, starting from 0.
Definition at line 102 of file Range.h.
Referenced by nixf::Node::src(), and nixd::toLSPPosition().
|
default |
|
inlinenodiscard |
Position in the source file. (Line
+ Column
)
Definition at line 99 of file Range.h.
Referenced by nixf::LexerCursorRange::range().
|
inlinestaticnodiscard |
|
friend |