edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
textlexer.h
Go to the documentation of this file.
1// edbee - Copyright (c) 2012-2025 by Rick Blommers and contributors
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
6#include "edbee/exports.h"
7
9
10namespace edbee {
11
12class TextGrammar;
13class TextDocument;
15
18public:
20 virtual ~TextLexer() {}
21
23// virtual void textReplaced( int offset, int length, int newLength ) = 0;
24 virtual void textChanged( const edbee::TextBufferChange& change ) = 0;
25
26
29 inline TextGrammar* grammar() { return grammarRef_; }
30
37 virtual void lexRange( int beginOffset, int endOffset ) = 0;
38
39
40 TextDocumentScopes* textScopes() { return textDocumentScopesRef_; }
41 TextDocument* textDocument();
42
43private:
44 TextDocumentScopes* textDocumentScopesRef_;
45 TextGrammar* grammarRef_;
46};
47
48} // edbee
This clas represents a text buffer change and is used to pass around between events This is a sharedd...
Definition textbuffer.h:45
This is the base and abstract class of a text document A TextDocument is the model part of the editor...
Definition textdocument.h:42
This class is used to 'contain' all document scope information.
Definition textdocumentscopes.h:322
This class defines a single language grammar.
Definition textgrammar.h:124
TextGrammar * grammar()
Definition textlexer.h:29
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 optimi...
virtual void textChanged(const edbee::TextBufferChange &change)=0
This method is called to notify the lexer some data has been changed.
virtual ~TextLexer()
Definition textlexer.h:20
TextLexer(TextDocumentScopes *scopes)
Definition textlexer.cpp:13
TextDocumentScopes * textScopes()
Definition textlexer.h:40
void setGrammar(TextGrammar *grammar)
This method is called to notify the lexer the grammar has been changed.
Definition textlexer.cpp:19
#define EDBEE_EXPORT
Definition exports.h:15
QT Acessibility has an issue with reporting blank lines between elements lines. defining 'WINDOWS_EMP...
Definition commentcommand.cpp:20