Back to index

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

List of all members.

Public Member Functions

def __init__

Static Public Attributes

string name = 'C#'
list aliases = ['csharp', 'c#']
list filenames = ['*.cs']
list mimetypes = ['text/x-csharp']
 flags = re.MULTILINE|re.DOTALL|re.UNICODE
dictionary levels
dictionary tokens = {}
 token_variants = True

Private Attributes

 _tokens

Detailed Description

For `C# <http://msdn2.microsoft.com/en-us/vcsharp/default.aspx>`_
source code.

Additional options accepted:

`unicodelevel`
  Determines which Unicode characters this lexer allows for identifiers.
  The possible values are:

  * ``none`` -- only the ASCII letters and numbers are allowed. This
    is the fastest selection.
  * ``basic`` -- all Unicode characters from the specification except
    category ``Lo`` are allowed.
  * ``full`` -- all Unicode characters as specified in the C# specs
    are allowed.  Note that this means a considerable slowdown since the
    ``Lo`` category has more than 40,000 characters in it!

  The default value is ``basic``.

  *New in Pygments 0.8.*

Definition at line 29 of file dotnet.py.


Constructor & Destructor Documentation

Definition at line 130 of file dotnet.py.

00130 
00131     def __init__(self, **options):
00132         level = get_choice_opt(options, 'unicodelevel', self.tokens.keys(), 'basic')
00133         if level not in self._all_tokens:
00134             # compile the regexes now
00135             self._tokens = self.__class__.process_tokendef(level)
00136         else:
00137             self._tokens = self._all_tokens[level]
00138 
00139         RegexLexer.__init__(self, **options)
00140 


Member Data Documentation

Definition at line 134 of file dotnet.py.

Definition at line 54 of file dotnet.py.

Definition at line 55 of file dotnet.py.

MoinMoin.support.pygments.lexers.dotnet.CSharpLexer.flags = re.MULTILINE|re.DOTALL|re.UNICODE [static]

Definition at line 58 of file dotnet.py.

Initial value:
{
        'none': '@?[_a-zA-Z][a-zA-Z0-9_]*',
        'basic': ('@?[_' + uni.Lu + uni.Ll + uni.Lt + uni.Lm + uni.Nl + ']' +
                  '[' + uni.Lu + uni.Ll + uni.Lt + uni.Lm + uni.Nl +
                  uni.Nd + uni.Pc + uni.Cf + uni.Mn + uni.Mc + ']*'),
        'full': ('@?(?:_|[^' +
                 _escape(uni.allexcept('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl')) + '])'
                 + '[^' + _escape(uni.allexcept('Lu', 'Ll', 'Lt', 'Lm', 'Lo',
                                                'Nl', 'Nd', 'Pc', 'Cf', 'Mn',
                                                'Mc')) + ']*'),
    }

Definition at line 63 of file dotnet.py.

Definition at line 56 of file dotnet.py.

Definition at line 53 of file dotnet.py.

Definition at line 76 of file dotnet.py.

Definition at line 75 of file dotnet.py.


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