diff options
author | shadchin <[email protected]> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/python/Pygments/py3/pygments/lexers/apl.py | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/apl.py')
-rw-r--r-- | contrib/python/Pygments/py3/pygments/lexers/apl.py | 40 |
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 ab6bbe51df2..4de74841c69 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), ], } |