# eric4.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

QsciLexer, Lexer

### 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 list of keywords.
language | Public method returning the language of the lexer.
lexer | Public method returning the type of the lexer.
styleBitsNeeded | Public method to get the number of style bits needed by the lexer.
styleText | Public method to perform the styling.

### Static Methods

None

#### LexerContainer (Constructor)

LexerContainer(parent = None)

Constructor

parent
  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
  style number (integer)

#### LexerContainer.keywords

keywords(kwSet)

Public method to get the list of keywords.

kwSet
  number of keyword set (integer, one based)

Returns:
  list of supported keywords (string) or None

#### LexerContainer.language

language()

Public method returning the language of the lexer.

Returns:
  language of the lexer (string)

#### LexerContainer.lexer

lexer()

Public method returning the type of the lexer.

Returns:
  type of the lexer (string)

#### LexerContainer.styleBitsNeeded

styleBitsNeeded()

Public method to get the number of style bits needed by the lexer.

Returns:
  number of style bits needed (integer)

#### LexerContainer.styleText

styleText(start, end)

Public method to perform the styling.

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

Up