class documentation

class DelphiLexer(Lexer):

View In Hierarchy

For Delphi (Borland Object Pascal), Turbo Pascal and Free Pascal source code.

Additional options accepted:

turbopascal
Highlight Turbo Pascal specific keywords (default: True).
delphi
Highlight Borland Delphi specific keywords (default: True).
freepascal
Highlight Free Pascal specific keywords (default: True).
units
A list of units that should be considered builtin, supported are System, SysUtils, Classes and Math. Default is to consider all of them builtin.
Constant ASM​_INSTRUCTIONS Undocumented
Constant ASM​_REGISTERS Undocumented
Constant BLOCK​_KEYWORDS Undocumented
Constant BUILTIN​_TYPES Undocumented
Constant BUILTIN​_UNITS Undocumented
Constant DELPHI​_KEYWORDS Undocumented
Constant DIRECTIVES Undocumented
Constant FREE​_PASCAL​_KEYWORDS Undocumented
Constant FUNCTION​_MODIFIERS Undocumented
Constant TURBO​_PASCAL​_KEYWORDS Undocumented
Method __init__ Undocumented
Method get​_tokens​_unprocessed Return an iterable of (index, tokentype, value) pairs where "index" is the starting position of the token within the input text.
Class Variable aliases Undocumented
Class Variable filenames Undocumented
Class Variable mimetypes Undocumented
Class Variable name Undocumented
Instance Variable builtins Undocumented
Instance Variable keywords Undocumented

Inherited from Lexer:

Method analyse​_text No summary
Method get​_tokens Return an iterable of (tokentype, value) pairs generated from text. If unfiltered is set to True, the filtering mechanism is bypassed even if filters are defined.
Class Variable alias​_filenames Undocumented
Method __repr__ Undocumented
Method add​_filter Add a new stream filter to this lexer.
Class Variable priority Undocumented
Instance Variable encoding Undocumented
Instance Variable ensurenl Undocumented
Instance Variable filters Undocumented
Instance Variable options Undocumented
Instance Variable stripall Undocumented
Instance Variable stripnl Undocumented
Instance Variable tabsize Undocumented
ASM_INSTRUCTIONS: set[str] =

Undocumented

Value
set(['aaa',
     'aad',
     'aam',
     'aas',
     'adc',
     'add',
     'and',
...
ASM_REGISTERS: set[str] =

Undocumented

Value
set(['ah',
     'al',
     'ax',
     'bh',
     'bl',
     'bp',
     'bx',
...
BLOCK_KEYWORDS: set[str] =

Undocumented

Value
set(['begin',
     'class',
     'const',
     'constructor',
     'destructor',
     'end',
     'finalization',
...
BUILTIN_TYPES: set[str] =

Undocumented

Value
set(['ansichar',
     'ansistring',
     'bool',
     'boolean',
     'byte',
     'bytebool',
     'cardinal',
...
BUILTIN_UNITS: dict =

Undocumented

Value
{'System': ('abs',
            'acquireexceptionobject',
            'addr',
            'ansitoutf8',
            'append',
            'arctan',
            'assert',
...
DELPHI_KEYWORDS: tuple[str, ...] =

Undocumented

Value
('as',
 'class',
 'except',
 'exports',
 'finalization',
 'finally',
 'initialization',
...
DIRECTIVES: set[str] =

Undocumented

Value
set(['absolute',
     'abstract',
     'assembler',
     'cppdecl',
     'default',
     'far',
     'far16',
...
FREE_PASCAL_KEYWORDS: tuple[str, ...] =

Undocumented

Value
('dispose', 'exit', 'false', 'new', 'true')
FUNCTION_MODIFIERS: set[str] =

Undocumented

Value
set(['alias',
     'cdecl',
     'export',
     'inline',
     'interrupt',
     'nostackframe',
     'pascal',
...
TURBO_PASCAL_KEYWORDS: tuple[str, ...] =

Undocumented

Value
('absolute',
 'and',
 'array',
 'asm',
 'begin',
 'break',
 'case',
...
def __init__(self, **options):

Undocumented

def get_tokens_unprocessed(self, text):

Return an iterable of (index, tokentype, value) pairs where "index" is the starting position of the token within the input text.

In subclasses, implement this method as a generator to maximize effectiveness.

aliases: list[str] =

Undocumented

filenames: list[str] =

Undocumented

mimetypes: list[str] =

Undocumented

name: str =

Undocumented

builtins: set =

Undocumented

keywords: set =

Undocumented