eric7.QScintilla.Lexers.LexerContainer

Module implementing a base class for custom lexers.

Global Attributes

None

Classes

LexerContainer Subclass as a base for the implementation of custom lexers.

Functions

None


LexerContainer

Subclass as a base for the implementation of custom lexers.

Derived from

Lexer, QsciLexer

Class Attributes

None

Class Methods

None

Methods

LexerContainer Constructor
description Public method returning the descriptions of the styles supported by the lexer.
keywords Public method to get the keywords.
language Public method returning the language of the lexer.
lexer Public method returning the type of the lexer.
styleText Public method to perform the styling.

Static Methods

None

LexerContainer (Constructor)

LexerContainer(parent=None)

Constructor

parent (QWidget)
parent widget of this lexer

LexerContainer.description

description(_style)

Public method returning the descriptions of the styles supported by the lexer.

Note: This methods needs to be overridden by the lexer class.

_style (int)
style number (unused)
Return:
description for the given style
Return Type:
str

LexerContainer.keywords

keywords(kwSet)

Public method to get the keywords.

kwSet (int)
number of the keyword set
Return:
string giving the keywords or None
Return Type:
str

LexerContainer.language

language()

Public method returning the language of the lexer.

Return:
language of the lexer
Return Type:
str

LexerContainer.lexer

lexer()

Public method returning the type of the lexer.

Return:
type of the lexer
Return Type:
str

LexerContainer.styleText

styleText(start, end)

Public method to perform the styling.

start (int)
position of first character to be styled
end (int)
position of last character to be styled
Up