aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/lexers/unicon.py
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/python/Pygments/py3/pygments/lexers/unicon.py
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/unicon.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/lexers/unicon.py68
1 files changed, 34 insertions, 34 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/unicon.py b/contrib/python/Pygments/py3/pygments/lexers/unicon.py
index 708bc3490b..4a76a0f821 100644
--- a/contrib/python/Pygments/py3/pygments/lexers/unicon.py
+++ b/contrib/python/Pygments/py3/pygments/lexers/unicon.py
@@ -4,7 +4,7 @@
Lexers for the Icon and Unicon languages, including ucode VM.
- :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -128,15 +128,15 @@ class UniconLexer(RegexLexer):
'WSync'), prefix=r'\b', suffix=r'\b'),
Name.Function),
include('numbers'),
- (r'<@|<<@|>@|>>@|\.>|->|===|~===|\*\*|\+\+|--|\.|~==|~=|<=|>=|==|'
- r'=|<<=|<<|>>=|>>|:=:|:=|->|<->|\+:=|\|', Operator),
+ (r'<@|<<@|>@|>>@|\.>|->|===|~===|\*\*|\+\+|--|\.|~==|~=|<=|>=|==|'
+ r'=|<<=|<<|>>=|>>|:=:|:=|->|<->|\+:=|\|', Operator),
(r'"(?:[^\\"]|\\.)*"', String),
(r"'(?:[^\\']|\\.)*'", String.Character),
(r'[*<>+=/&!?@~\\-]', Operator),
(r'\^', Operator),
(r'(\w+)(\s*|[(,])', bygroups(Name, using(this))),
- (r"[\[\]]", Punctuation),
- (r"<>|=>|[()|:;,.'`{}%&?]", Punctuation),
+ (r"[\[\]]", Punctuation),
+ (r"<>|=>|[()|:;,.'`{}%&?]", Punctuation),
(r'\n+', Text),
],
'numbers': [
@@ -269,14 +269,14 @@ class IconLexer(RegexLexer):
'WSync'), prefix=r'\b', suffix=r'\b'),
Name.Function),
include('numbers'),
- (r'===|~===|\*\*|\+\+|--|\.|==|~==|<=|>=|=|~=|<<=|<<|>>=|>>|'
- r':=:|:=|<->|<-|\+:=|\|\||\|', Operator),
+ (r'===|~===|\*\*|\+\+|--|\.|==|~==|<=|>=|=|~=|<<=|<<|>>=|>>|'
+ r':=:|:=|<->|<-|\+:=|\|\||\|', Operator),
(r'"(?:[^\\"]|\\.)*"', String),
(r"'(?:[^\\']|\\.)*'", String.Character),
(r'[*<>+=/&!?@~\\-]', Operator),
(r'(\w+)(\s*|[(,])', bygroups(Name, using(this))),
- (r"[\[\]]", Punctuation),
- (r"<>|=>|[()|:;,.'`{}%\^&?]", Punctuation),
+ (r"[\[\]]", Punctuation),
+ (r"<>|=>|[()|:;,.'`{}%\^&?]", Punctuation),
(r'\n+', Text),
],
'numbers': [
@@ -384,28 +384,28 @@ class UcodeLexer(RegexLexer):
(r'[\w-]+', Text),
],
}
-
- def analyse_text(text):
- """endsuspend and endrepeat are unique to this language, and
- \\self, /self doesn't seem to get used anywhere else either."""
- result = 0
-
- if 'endsuspend' in text:
- result += 0.1
-
- if 'endrepeat' in text:
- result += 0.1
-
- if ':=' in text:
- result += 0.01
-
- if 'procedure' in text and 'end' in text:
- result += 0.01
-
- # This seems quite unique to unicon -- doesn't appear in any other
- # example source we have (A quick search reveals that \SELF appears in
- # Perl/Raku code)
- if r'\self' in text and r'/self' in text:
- result += 0.5
-
- return result
+
+ def analyse_text(text):
+ """endsuspend and endrepeat are unique to this language, and
+ \\self, /self doesn't seem to get used anywhere else either."""
+ result = 0
+
+ if 'endsuspend' in text:
+ result += 0.1
+
+ if 'endrepeat' in text:
+ result += 0.1
+
+ if ':=' in text:
+ result += 0.01
+
+ if 'procedure' in text and 'end' in text:
+ result += 0.01
+
+ # This seems quite unique to unicon -- doesn't appear in any other
+ # example source we have (A quick search reveals that \SELF appears in
+ # Perl/Raku code)
+ if r'\self' in text and r'/self' in text:
+ result += 0.5
+
+ return result