diff options
| author | ilezhankin <[email protected]> | 2022-02-10 16:45:56 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:45:56 +0300 | 
| commit | 62a805381e41500fbc7914c37c71ab040a098f4e (patch) | |
| tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /contrib/python/Pygments/py3/pygments/lexers/x10.py | |
| parent | 1d125034f06575234f83f24f08677955133f140e (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/x10.py')
| -rw-r--r-- | contrib/python/Pygments/py3/pygments/lexers/x10.py | 124 | 
1 files changed, 62 insertions, 62 deletions
| diff --git a/contrib/python/Pygments/py3/pygments/lexers/x10.py b/contrib/python/Pygments/py3/pygments/lexers/x10.py index a18e7eb8397..a5aff36d49e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/x10.py +++ b/contrib/python/Pygments/py3/pygments/lexers/x10.py @@ -1,65 +1,65 @@ -"""  -    pygments.lexers.x10  -    ~~~~~~~~~~~~~~~~~~~  -  -    Lexers for the X10 programming language.  -  +""" +    pygments.lexers.x10 +    ~~~~~~~~~~~~~~~~~~~ + +    Lexers for the X10 programming language. +      :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. -    :license: BSD, see LICENSE for details.  -"""  -  -from pygments.lexer import RegexLexer  +    :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer  from pygments.token import Text, Comment, Keyword, String -  -__all__ = ['X10Lexer']  -  -class X10Lexer(RegexLexer):  -    """  -    For the X10 language.  -  -    .. versionadded:: 0.1  -    """  -  -    name = 'X10'  -    aliases = ['x10', 'xten']  -    filenames = ['*.x10']  -    mimetypes = ['text/x-x10']  -  -    keywords = (  -        'as', 'assert', 'async', 'at', 'athome', 'ateach', 'atomic',  -        'break', 'case', 'catch', 'class', 'clocked', 'continue',  -        'def', 'default', 'do', 'else', 'final', 'finally', 'finish',  -        'for', 'goto', 'haszero', 'here', 'if', 'import', 'in',  -        'instanceof', 'interface', 'isref', 'new', 'offer',  -        'operator', 'package', 'return', 'struct', 'switch', 'throw',  -        'try', 'type', 'val', 'var', 'when', 'while'  -    )  -  -    types = (  -        'void'  -    )  -  -    values = (  -        'false', 'null', 'self', 'super', 'this', 'true'  -    )  -  -    modifiers = (  -        'abstract', 'extends', 'implements', 'native', 'offers',  -        'private', 'property', 'protected', 'public', 'static',  -        'throws', 'transient'  -    )  -  -    tokens = {  -        'root': [  -            (r'[^\S\n]+', Text),  -            (r'//.*?\n', Comment.Single),  -            (r'/\*(.|\n)*?\*/', Comment.Multiline),  -            (r'\b(%s)\b' % '|'.join(keywords), Keyword),  -            (r'\b(%s)\b' % '|'.join(types), Keyword.Type),  -            (r'\b(%s)\b' % '|'.join(values), Keyword.Constant),  -            (r'\b(%s)\b' % '|'.join(modifiers), Keyword.Declaration),  + +__all__ = ['X10Lexer'] + +class X10Lexer(RegexLexer): +    """ +    For the X10 language. + +    .. versionadded:: 0.1 +    """ + +    name = 'X10' +    aliases = ['x10', 'xten'] +    filenames = ['*.x10'] +    mimetypes = ['text/x-x10'] + +    keywords = ( +        'as', 'assert', 'async', 'at', 'athome', 'ateach', 'atomic', +        'break', 'case', 'catch', 'class', 'clocked', 'continue', +        'def', 'default', 'do', 'else', 'final', 'finally', 'finish', +        'for', 'goto', 'haszero', 'here', 'if', 'import', 'in', +        'instanceof', 'interface', 'isref', 'new', 'offer', +        'operator', 'package', 'return', 'struct', 'switch', 'throw', +        'try', 'type', 'val', 'var', 'when', 'while' +    ) + +    types = ( +        'void' +    ) + +    values = ( +        'false', 'null', 'self', 'super', 'this', 'true' +    ) + +    modifiers = ( +        'abstract', 'extends', 'implements', 'native', 'offers', +        'private', 'property', 'protected', 'public', 'static', +        'throws', 'transient' +    ) + +    tokens = { +        'root': [ +            (r'[^\S\n]+', Text), +            (r'//.*?\n', Comment.Single), +            (r'/\*(.|\n)*?\*/', Comment.Multiline), +            (r'\b(%s)\b' % '|'.join(keywords), Keyword), +            (r'\b(%s)\b' % '|'.join(types), Keyword.Type), +            (r'\b(%s)\b' % '|'.join(values), Keyword.Constant), +            (r'\b(%s)\b' % '|'.join(modifiers), Keyword.Declaration),              (r'"(\\\\|\\[^\\]|[^"\\])*"', String), -            (r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char),  -            (r'.', Text)  -        ],  -    }  +            (r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char), +            (r'.', Text) +        ], +    } | 
