edbee - Qt Editor Library
Public Member Functions | List of all members
edbee::TextLexer Class Referenceabstract

This is a single lexer. More...

#include <textlexer.h>

+ Inheritance diagram for edbee::TextLexer:
+ Collaboration diagram for edbee::TextLexer:

Public Member Functions

 TextLexer (TextDocumentScopes *scopes)
 
virtual ~TextLexer ()
 
virtual void textChanged (const edbee::TextBufferChange &change)=0
 This method is called to notify the lexer some data has been changed. More...
 
void setGrammar (TextGrammar *grammar)
 This method is called to notify the lexer the grammar has been changed. More...
 
TextGrammargrammar ()
 
virtual void lexRange (int beginOffset, int endOffset)=0
 This method is called when the given range needs to be lexed WARNING, this method must be VERY optimized and should 'remember' the lexing states between calls. To invalidate the scopes/lexing state the textReplaced method can be used. More...
 
TextDocumentScopestextScopes ()
 
TextDocumenttextDocument ()
 This method returns the text document. More...
 

Detailed Description

This is a single lexer.

Constructor & Destructor Documentation

◆ TextLexer()

edbee::TextLexer::TextLexer ( TextDocumentScopes scopes)

◆ ~TextLexer()

virtual edbee::TextLexer::~TextLexer ( )
inlinevirtual

Member Function Documentation

◆ grammar()

TextGrammar* edbee::TextLexer::grammar ( )
inline

◆ lexRange()

virtual void edbee::TextLexer::lexRange ( int  beginOffset,
int  endOffset 
)
pure virtual

This method is called when the given range needs to be lexed WARNING, this method must be VERY optimized and should 'remember' the lexing states between calls. To invalidate the scopes/lexing state the textReplaced method can be used.

Parameters
beginOffsetthe first offset
endOffsetthe last offset to

Implemented in edbee::GrammarTextLexer.

◆ setGrammar()

void edbee::TextLexer::setGrammar ( TextGrammar grammar)

This method is called to notify the lexer the grammar has been changed.

◆ textChanged()

virtual void edbee::TextLexer::textChanged ( const edbee::TextBufferChange change)
pure virtual

This method is called to notify the lexer some data has been changed.

Implemented in edbee::GrammarTextLexer.

◆ textDocument()

TextDocument * edbee::TextLexer::textDocument ( )

This method returns the text document.

◆ textScopes()

TextDocumentScopes* edbee::TextLexer::textScopes ( )
inline

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