diff options
author | Matth?us G. Chajdas <dev@anteru.net> | 2019-11-10 13:56:53 +0100 |
---|---|---|
committer | Matth?us G. Chajdas <dev@anteru.net> | 2019-11-10 13:56:53 +0100 |
commit | 1dd3124a9770e11b6684e5dd1e6bc15a0aa3bc67 (patch) | |
tree | 87a171383266dd1f64196589af081bc2f8e497c3 /pygments/lexers/x10.py | |
parent | f1c080e184dc1bbc36eaa7cd729ff3a499de568a (diff) | |
download | pygments-master.tar.gz |
Diffstat (limited to 'pygments/lexers/x10.py')
-rw-r--r-- | pygments/lexers/x10.py | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/pygments/lexers/x10.py b/pygments/lexers/x10.py deleted file mode 100644 index eac87b1c..00000000 --- a/pygments/lexers/x10.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- -""" - pygments.lexers.x10 - ~~~~~~~~~~~~~~~~~~~ - - Lexers for the X10 programming language. - - :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import re - -from pygments.lexer import RegexLexer -from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ - Number, Punctuation, Error - -__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) - ], - } |