Plugin_Project_Django.ProjectDjango.LexerDjango

Module implementing a custom lexer for Django templates.

Global Attributes

DJANGO_VARIABLE
TOKEN_MAP

Classes

LexerDjango Class implementing a custom lexer for Django templates.

Functions

None


LexerDjango

Class implementing a custom lexer for Django templates.

Derived from

LexerContainer

Class Attributes

None

Methods

LexerDjango Constructor
defaultColor Public method to get the default foreground color for a style.
defaultEolFill Public method to get the default eolfill setting for a style.
defaultFont Public method to get the default font for a style.
defaultPaper Public method to get the default background color for a style.
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.
styleText Public method to perform the styling.

LexerDjango (Constructor)

LexerDjango(parent=None)

Constructor

parent
parent widget of this lexer

LexerDjango.defaultColor

defaultColor(style)

Public method to get the default foreground color for a style.

style
style number (integer)
Returns:
foreground color (QColor)

LexerDjango.defaultEolFill

defaultEolFill(style)

Public method to get the default eolfill setting for a style.

style
style number (integer)
Returns:
eolfill setting (boolean)

LexerDjango.defaultFont

defaultFont(style)

Public method to get the default font for a style.

style
style number (integer)
Returns:
font (QFont)

LexerDjango.defaultPaper

defaultPaper(style)

Public method to get the default background color for a style.

style
style number (integer)
Returns:
background color (QColor)

LexerDjango.description

description(style)

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

style
style number (integer)

LexerDjango.keywords

keywords(set)

Public method to get the list of keywords.

set
number of keyword set (integer, one based)
Returns:
list of supported keywords (string) or None

LexerDjango.language

language()

Public method returning the language of the lexer.

Returns:
language of the lexer (string)

LexerDjango.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