Back to index

moin  1.9.0~rc2
Static Public Attributes
MoinMoin.support.pygments.lexers.templates.MyghtyLexer Class Reference
Inheritance diagram for MoinMoin.support.pygments.lexers.templates.MyghtyLexer:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.support.pygments.lexers.templates.MyghtyLexer:
Collaboration graph
[legend]

List of all members.

Static Public Attributes

string name = 'Myghty'
list aliases = ['myghty']
list filenames = ['*.myt', 'autodelegate']
list mimetypes = ['application/x-myghty']
dictionary tokens

Detailed Description

Generic `myghty templates`_ lexer. Code that isn't Myghty
markup is yielded as `Token.Other`.

*New in Pygments 0.6.*

.. _myghty templates: http://www.myghty.org/

Definition at line 277 of file templates.py.


Member Data Documentation

Definition at line 288 of file templates.py.

list MoinMoin.support.pygments.lexers.templates.MyghtyLexer.filenames = ['*.myt', 'autodelegate'] [static]

Definition at line 289 of file templates.py.

list MoinMoin.support.pygments.lexers.templates.MyghtyLexer.mimetypes = ['application/x-myghty'] [static]

Definition at line 290 of file templates.py.

Definition at line 287 of file templates.py.

Initial value:
{
        'root': [
            (r'\s+', Text),
            (r'(<%(def|method))(\s*)(.*?)(>)(.*?)(</%\2\s*>)(?s)',
             bygroups(Name.Tag, None, Text, Name.Function, Name.Tag,
                      using(this), Name.Tag)),
            (r'(<%(\w+))(.*?)(>)(.*?)(</%\2\s*>)(?s)',
             bygroups(Name.Tag, None, Name.Function, Name.Tag,
                      using(PythonLexer), Name.Tag)),
            (r'(<&[^|])(.*?)(,.*?)?(&>)',
             bygroups(Name.Tag, Name.Function, using(PythonLexer), Name.Tag)),
            (r'(<&\|)(.*?)(,.*?)?(&>)(?s)',
             bygroups(Name.Tag, Name.Function, using(PythonLexer), Name.Tag)),
            (r'</&>', Name.Tag),
            (r'(<%!?)(.*?)(%>)(?s)',
             bygroups(Name.Tag, using(PythonLexer), Name.Tag)),
            (r'(?<=^)#[^\n]*(\n|\Z)', Comment),
            (r'(?<=^)(%)([^\n]*)(\n|\Z)',
             bygroups(Name.Tag, using(PythonLexer), Other)),
            (r"""(?sx)     (.+?)               # anything, followed by:     (?:      (?<=\n)(?=[%#]) |  # an eval or comment line      (?=</?[%&]) |      # a substitution or block or                         # call start or end                         # - don't consume      (\\\n) |           # an escaped newline      \Z                 # end of string     )""", bygroups(Other, Operator)),
        ]
    }

Definition at line 292 of file templates.py.


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