Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
MoinMoin.support.pygments.lexers.compiled.CLexer Class Reference
Inheritance diagram for MoinMoin.support.pygments.lexers.compiled.CLexer:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.support.pygments.lexers.compiled.CLexer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def get_tokens_unprocessed

Public Attributes

 stdlibhighlighting
 c99highlighting

Static Public Attributes

string name = 'C'
list aliases = ['c']
list filenames = ['*.c', '*.h']
list mimetypes = ['text/x-chdr', 'text/x-csrc']
dictionary tokens
list stdlib_types
list c99_types

Static Private Attributes

string _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+'

Detailed Description

For C source code with preprocessor directives.

Definition at line 35 of file compiled.py.


Constructor & Destructor Documentation

Definition at line 147 of file compiled.py.

00147 
00148     def __init__(self, **options):
00149         self.stdlibhighlighting = get_bool_opt(options,
00150                 'stdlibhighlighting', True)
00151         self.c99highlighting = get_bool_opt(options,
00152                 'c99highlighting', True)
00153         RegexLexer.__init__(self, **options)


Member Function Documentation

Definition at line 154 of file compiled.py.

00154 
00155     def get_tokens_unprocessed(self, text):
00156         for index, token, value in \
00157             RegexLexer.get_tokens_unprocessed(self, text):
00158             if token is Name:
00159                 if self.stdlibhighlighting and value in self.stdlib_types:
00160                     token = Keyword.Type
00161                 elif self.c99highlighting and value in self.c99_types:
00162                     token = Keyword.Type
00163             yield index, token, value

Here is the caller graph for this function:


Member Data Documentation

string MoinMoin.support.pygments.lexers.compiled.CLexer._ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+' [static, private]

Definition at line 45 of file compiled.py.

Definition at line 40 of file compiled.py.

Initial value:
['_Bool', '_Complex', 'int8_t', 'int16_t', 'int32_t', 'int64_t',
            'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', 'int_least8_t',
            'int_least16_t', 'int_least32_t', 'int_least64_t',
            'uint_least8_t', 'uint_least16_t', 'uint_least32_t',
            'uint_least64_t', 'int_fast8_t', 'int_fast16_t', 'int_fast32_t',
            'int_fast64_t', 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t',
            'uint_fast64_t', 'intptr_t', 'uintptr_t', 'intmax_t', 'uintmax_t']

Definition at line 139 of file compiled.py.

Definition at line 150 of file compiled.py.

Definition at line 41 of file compiled.py.

list MoinMoin.support.pygments.lexers.compiled.CLexer.mimetypes = ['text/x-chdr', 'text/x-csrc'] [static]

Definition at line 42 of file compiled.py.

Definition at line 39 of file compiled.py.

Initial value:
['size_t', 'ssize_t', 'off_t', 'wchar_t', 'ptrdiff_t',
            'sig_atomic_t', 'fpos_t', 'clock_t', 'time_t', 'va_list',
            'jmp_buf', 'FILE', 'DIR', 'div_t', 'ldiv_t', 'mbstate_t',
            'wctrans_t', 'wint_t', 'wctype_t']

Definition at line 135 of file compiled.py.

Definition at line 148 of file compiled.py.

Definition at line 47 of file compiled.py.


The documentation for this class was generated from the following file: