edbee - Qt Editor Library
|
A simple lexer matches texts with simple regular expressions. More...
#include <grammartextlexer.h>
Public Member Functions | |
GrammarTextLexer (TextDocumentScopes *scopes) | |
Constructs the grammar textlexer. More... | |
virtual | ~GrammarTextLexer () |
The destructor. More... | |
virtual void | textChanged (const TextBufferChange &change) |
This method is called to notify the lexer some data has been changed. More... | |
virtual void | lexLines (int line, int lineCount) |
This method lexes a range of line. More... | |
virtual void | lexRange (int beginOffset, int endOffset) |
This method is called when the given range needs to be lexed. More... | |
Public Member Functions inherited from edbee::TextLexer | |
TextLexer (TextDocumentScopes *scopes) | |
virtual | ~TextLexer () |
void | setGrammar (TextGrammar *grammar) |
This method is called to notify the lexer the grammar has been changed. More... | |
TextGrammar * | grammar () |
TextDocumentScopes * | textScopes () |
TextDocument * | textDocument () |
This method returns the text document. More... | |
A simple lexer matches texts with simple regular expressions.
edbee::GrammarTextLexer::GrammarTextLexer | ( | TextDocumentScopes * | scopes | ) |
Constructs the grammar textlexer.
scopes | a reference to the scopes model |
|
virtual |
The destructor.
|
virtual |
This method lexes a range of line.
|
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
beginOffset | the first offset |
endOffset | the last offset to |
Implements edbee::TextLexer.
|
virtual |
This method is called to notify the lexer some data has been changed.
Implements edbee::TextLexer.