aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/lexers/apl.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/apl.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/apl.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/lexers/apl.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/apl.py b/contrib/python/Pygments/py3/pygments/lexers/apl.py
index 4de74841c6..ab6bbe51df 100644
--- a/contrib/python/Pygments/py3/pygments/lexers/apl.py
+++ b/contrib/python/Pygments/py3/pygments/lexers/apl.py
@@ -4,7 +4,7 @@
Lexers for APL.
- :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.
"""
@@ -17,16 +17,16 @@ __all__ = ['APLLexer']
class APLLexer(RegexLexer):
"""
- A simple `APL <https://en.m.wikipedia.org/wiki/APL_(programming_language)>`_ lexer.
+ A simple `APL <https://en.m.wikipedia.org/wiki/APL_(programming_language)>`_ lexer.
.. versionadded:: 2.0
"""
name = 'APL'
aliases = ['apl']
- filenames = [
- '*.apl', '*.aplf', '*.aplo', '*.apln',
- '*.aplc', '*.apli', '*.dyalog',
- ]
+ filenames = [
+ '*.apl', '*.aplf', '*.aplo', '*.apln',
+ '*.aplc', '*.apli', '*.dyalog',
+ ]
tokens = {
'root': [
@@ -37,7 +37,7 @@ class APLLexer(RegexLexer):
# Comment
# =======
# '⍝' is traditional; '#' is supported by GNU APL and NGN (but not Dyalog)
- (r'[⍝#].*$', Comment.Single),
+ (r'[⍝#].*$', Comment.Single),
#
# Strings
# =======
@@ -48,7 +48,7 @@ class APLLexer(RegexLexer):
# ===========
# This token type is used for diamond and parenthesis
# but not for bracket and ; (see below)
- (r'[⋄◇()]', Punctuation),
+ (r'[⋄◇()]', Punctuation),
#
# Array indexing
# ==============
@@ -59,45 +59,45 @@ class APLLexer(RegexLexer):
# Distinguished names
# ===================
# following IBM APL2 standard
- (r'⎕[A-Za-zΔ∆⍙][A-Za-zΔ∆⍙_¯0-9]*', Name.Function),
+ (r'⎕[A-Za-zΔ∆⍙][A-Za-zΔ∆⍙_¯0-9]*', Name.Function),
#
# Labels
# ======
# following IBM APL2 standard
- # (r'[A-Za-zΔ∆⍙][A-Za-zΔ∆⍙_¯0-9]*:', Name.Label),
+ # (r'[A-Za-zΔ∆⍙][A-Za-zΔ∆⍙_¯0-9]*:', Name.Label),
#
# Variables
# =========
- # following IBM APL2 standard (with a leading _ ok for GNU APL and Dyalog)
- (r'[A-Za-zΔ∆⍙_][A-Za-zΔ∆⍙_¯0-9]*', Name.Variable),
+ # following IBM APL2 standard (with a leading _ ok for GNU APL and Dyalog)
+ (r'[A-Za-zΔ∆⍙_][A-Za-zΔ∆⍙_¯0-9]*', Name.Variable),
#
# Numbers
# =======
- (r'¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞)'
- r'([Jj]¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞))?',
+ (r'¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞)'
+ r'([Jj]¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞))?',
Number),
#
# Operators
# ==========
- (r'[\.\\\/⌿⍀¨⍣⍨⍠⍤∘⌸&⌶@⌺⍥⍛⍢]', Name.Attribute), # closest token type
- (r'[+\-×÷⌈⌊∣|⍳?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⌸⍯↗⊆⊇⍸√⌾…⍮]',
+ (r'[\.\\\/⌿⍀¨⍣⍨⍠⍤∘⌸&⌶@⌺⍥⍛⍢]', Name.Attribute), # closest token type
+ (r'[+\-×÷⌈⌊∣|⍳?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⌸⍯↗⊆⊇⍸√⌾…⍮]',
Operator),
#
# Constant
# ========
- (r'⍬', Name.Constant),
+ (r'⍬', Name.Constant),
#
# Quad symbol
# ===========
- (r'[⎕⍞]', Name.Variable.Global),
+ (r'[⎕⍞]', Name.Variable.Global),
#
# Arrows left/right
# =================
- (r'[←→]', Keyword.Declaration),
+ (r'[←→]', Keyword.Declaration),
#
# D-Fn
# ====
- (r'[⍺⍵⍶⍹∇:]', Name.Builtin.Pseudo),
+ (r'[⍺⍵⍶⍹∇:]', Name.Builtin.Pseudo),
(r'[{}]', Keyword.Type),
],
}