nixd
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
nixf::TextEdit Class Reference

#include <Diagnostic.h>

Public Member Functions

 TextEdit (LexerCursorRange OldRange, std::string NewText)
 
bool isReplace () const
 
bool isRemoval () const
 
bool isInsertion () const
 
LexerCursorRange oldRange () const
 
std::string_view newText () const
 

Static Public Member Functions

static TextEdit mkInsertion (LexerCursor P, std::string NewText)
 
static TextEdit mkRemoval (LexerCursorRange RemovingRange)
 

Detailed Description

Remove the text at OldRange, and replace it as NewText Special cases:

  1. Insertions: special OldRange that Begin == End.
  2. Removals: empty NewText.

Definition at line 25 of file Diagnostic.h.

Constructor & Destructor Documentation

◆ TextEdit()

nixf::TextEdit::TextEdit ( LexerCursorRange OldRange,
std::string NewText )
inline

Definition at line 30 of file Diagnostic.h.

References nixf::LexerCursorRange::lCur(), and nixf::LexerCursorRange::rCur().

Member Function Documentation

◆ isInsertion()

bool nixf::TextEdit::isInsertion ( ) const
inline

Definition at line 49 of file Diagnostic.h.

References nixf::LexerCursorRange::lCur(), and nixf::LexerCursorRange::rCur().

Referenced by isReplace().

◆ isRemoval()

bool nixf::TextEdit::isRemoval ( ) const
inline

Definition at line 47 of file Diagnostic.h.

Referenced by isReplace().

◆ isReplace()

bool nixf::TextEdit::isReplace ( ) const
inline

Definition at line 43 of file Diagnostic.h.

References isInsertion(), and isRemoval().

◆ mkInsertion()

static TextEdit nixf::TextEdit::mkInsertion ( LexerCursor P,
std::string NewText )
inlinestatic

◆ mkRemoval()

static TextEdit nixf::TextEdit::mkRemoval ( LexerCursorRange RemovingRange)
inlinestatic

◆ newText()

std::string_view nixf::TextEdit::newText ( ) const
inline

Definition at line 54 of file Diagnostic.h.

◆ oldRange()

LexerCursorRange nixf::TextEdit::oldRange ( ) const
inline

Definition at line 53 of file Diagnostic.h.


The documentation for this class was generated from the following file: