edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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.
 
void setGrammar (TextGrammar *grammar)
 This method is called to notify the lexer the grammar has been changed.
 
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.
 
TextDocumentScopestextScopes ()
 
TextDocumenttextDocument ()
 This method returns the text document.
 

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: