summaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/lexers/qvt.py
diff options
context:
space:
mode:
authororivej <[email protected]>2022-02-10 16:45:01 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:45:01 +0300
commit2d37894b1b037cf24231090eda8589bbb44fb6fc (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/python/Pygments/py3/pygments/lexers/qvt.py
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/qvt.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/lexers/qvt.py94
1 files changed, 47 insertions, 47 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/qvt.py b/contrib/python/Pygments/py3/pygments/lexers/qvt.py
index bc2b4192d17..72817f09c12 100644
--- a/contrib/python/Pygments/py3/pygments/lexers/qvt.py
+++ b/contrib/python/Pygments/py3/pygments/lexers/qvt.py
@@ -8,8 +8,8 @@
:license: BSD, see LICENSE for details.
"""
-from pygments.lexer import RegexLexer, bygroups, include, combined, default, \
- words
+from pygments.lexer import RegexLexer, bygroups, include, combined, default, \
+ words
from pygments.token import Text, Comment, Operator, Keyword, Punctuation, \
Name, String, Number
@@ -50,26 +50,26 @@ class QVToLexer(RegexLexer):
bygroups(Comment, Comment, Comment.Preproc, Comment)),
# Uncomment the following if you want to distinguish between
# '/*' and '/**', à la javadoc
- # (r'/[*]{2}(.|\n)*?[*]/', Comment.Multiline),
+ # (r'/[*]{2}(.|\n)*?[*]/', Comment.Multiline),
(r'/[*](.|\n)*?[*]/', Comment.Multiline),
(r'\\\n', Text),
(r'(and|not|or|xor|##?)\b', Operator.Word),
- (r'(:{1,2}=|[-+]=)\b', Operator.Word),
- (r'(@|<<|>>)\b', Keyword), # stereotypes
- (r'!=|<>|==|=|!->|->|>=|<=|[.]{3}|[+/*%=<>&|.~]', Operator),
+ (r'(:{1,2}=|[-+]=)\b', Operator.Word),
+ (r'(@|<<|>>)\b', Keyword), # stereotypes
+ (r'!=|<>|==|=|!->|->|>=|<=|[.]{3}|[+/*%=<>&|.~]', Operator),
(r'[]{}:(),;[]', Punctuation),
(r'(true|false|unlimited|null)\b', Keyword.Constant),
(r'(this|self|result)\b', Name.Builtin.Pseudo),
(r'(var)\b', Keyword.Declaration),
(r'(from|import)\b', Keyword.Namespace, 'fromimport'),
- (r'(metamodel|class|exception|primitive|enum|transformation|'
- r'library)(\s+)(\w+)',
+ (r'(metamodel|class|exception|primitive|enum|transformation|'
+ r'library)(\s+)(\w+)',
bygroups(Keyword.Word, Text, Name.Class)),
- (r'(exception)(\s+)(\w+)',
- bygroups(Keyword.Word, Text, Name.Exception)),
+ (r'(exception)(\s+)(\w+)',
+ bygroups(Keyword.Word, Text, Name.Exception)),
(r'(main)\b', Name.Function),
- (r'(mapping|helper|query)(\s+)',
- bygroups(Keyword.Declaration, Text), 'operation'),
+ (r'(mapping|helper|query)(\s+)',
+ bygroups(Keyword.Declaration, Text), 'operation'),
(r'(assert)(\s+)\b', bygroups(Keyword, Text), 'assert'),
(r'(Bag|Collection|Dict|OrderedSet|Sequence|Set|Tuple|List)\b',
Keyword.Type),
@@ -78,45 +78,45 @@ class QVToLexer(RegexLexer):
("'", String, combined('stringescape', 'sqs')),
include('name'),
include('numbers'),
- # (r'([a-zA-Z_]\w*)(::)([a-zA-Z_]\w*)',
+ # (r'([a-zA-Z_]\w*)(::)([a-zA-Z_]\w*)',
# bygroups(Text, Text, Text)),
- ],
+ ],
'fromimport': [
(r'(?:[ \t]|\\\n)+', Text),
- (r'[a-zA-Z_][\w.]*', Name.Namespace),
- default('#pop'),
- ],
+ (r'[a-zA-Z_][\w.]*', Name.Namespace),
+ default('#pop'),
+ ],
'operation': [
(r'::', Text),
- (r'(.*::)([a-zA-Z_]\w*)([ \t]*)(\()',
- bygroups(Text, Name.Function, Text, Punctuation), '#pop')
- ],
+ (r'(.*::)([a-zA-Z_]\w*)([ \t]*)(\()',
+ bygroups(Text, Name.Function, Text, Punctuation), '#pop')
+ ],
'assert': [
(r'(warning|error|fatal)\b', Keyword, '#pop'),
- default('#pop'), # all else: go back
- ],
+ default('#pop'), # all else: go back
+ ],
'keywords': [
- (words((
- 'abstract', 'access', 'any', 'assert', 'blackbox', 'break',
- 'case', 'collect', 'collectNested', 'collectOne', 'collectselect',
- 'collectselectOne', 'composes', 'compute', 'configuration',
- 'constructor', 'continue', 'datatype', 'default', 'derived',
- 'disjuncts', 'do', 'elif', 'else', 'end', 'endif', 'except',
- 'exists', 'extends', 'forAll', 'forEach', 'forOne', 'from', 'if',
- 'implies', 'in', 'inherits', 'init', 'inout', 'intermediate',
- 'invresolve', 'invresolveIn', 'invresolveone', 'invresolveoneIn',
- 'isUnique', 'iterate', 'late', 'let', 'literal', 'log', 'map',
- 'merges', 'modeltype', 'new', 'object', 'one', 'ordered', 'out',
- 'package', 'population', 'property', 'raise', 'readonly',
- 'references', 'refines', 'reject', 'resolve', 'resolveIn',
- 'resolveone', 'resolveoneIn', 'return', 'select', 'selectOne',
- 'sortedBy', 'static', 'switch', 'tag', 'then', 'try', 'typedef',
- 'unlimited', 'uses', 'when', 'where', 'while', 'with', 'xcollect',
- 'xmap', 'xselect'), suffix=r'\b'), Keyword),
+ (words((
+ 'abstract', 'access', 'any', 'assert', 'blackbox', 'break',
+ 'case', 'collect', 'collectNested', 'collectOne', 'collectselect',
+ 'collectselectOne', 'composes', 'compute', 'configuration',
+ 'constructor', 'continue', 'datatype', 'default', 'derived',
+ 'disjuncts', 'do', 'elif', 'else', 'end', 'endif', 'except',
+ 'exists', 'extends', 'forAll', 'forEach', 'forOne', 'from', 'if',
+ 'implies', 'in', 'inherits', 'init', 'inout', 'intermediate',
+ 'invresolve', 'invresolveIn', 'invresolveone', 'invresolveoneIn',
+ 'isUnique', 'iterate', 'late', 'let', 'literal', 'log', 'map',
+ 'merges', 'modeltype', 'new', 'object', 'one', 'ordered', 'out',
+ 'package', 'population', 'property', 'raise', 'readonly',
+ 'references', 'refines', 'reject', 'resolve', 'resolveIn',
+ 'resolveone', 'resolveoneIn', 'return', 'select', 'selectOne',
+ 'sortedBy', 'static', 'switch', 'tag', 'then', 'try', 'typedef',
+ 'unlimited', 'uses', 'when', 'where', 'while', 'with', 'xcollect',
+ 'xmap', 'xselect'), suffix=r'\b'), Keyword),
],
# There is no need to distinguish between String.Single and
@@ -125,27 +125,27 @@ class QVToLexer(RegexLexer):
(r'[^\\\'"\n]+', String),
# quotes, percents and backslashes must be parsed one at a time
(r'[\'"\\]', String),
- ],
+ ],
'stringescape': [
(r'\\([\\btnfr"\']|u[0-3][0-7]{2}|u[0-7]{1,2})', String.Escape)
],
- 'dqs': [ # double-quoted string
+ 'dqs': [ # double-quoted string
(r'"', String, '#pop'),
(r'\\\\|\\"', String.Escape),
include('strings')
- ],
- 'sqs': [ # single-quoted string
+ ],
+ 'sqs': [ # single-quoted string
(r"'", String, '#pop'),
(r"\\\\|\\'", String.Escape),
include('strings')
- ],
+ ],
'name': [
- (r'[a-zA-Z_]\w*', Name),
- ],
+ (r'[a-zA-Z_]\w*', Name),
+ ],
# numbers: excerpt taken from the python lexer
'numbers': [
(r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
(r'\d+[eE][+-]?[0-9]+', Number.Float),
(r'\d+', Number.Integer)
],
- }
+ }