diff options
author | Matthäus G. Chajdas <dev@anteru.net> | 2020-09-08 20:33:25 +0200 |
---|---|---|
committer | Matthäus G. Chajdas <dev@anteru.net> | 2020-09-08 20:33:25 +0200 |
commit | 203ef1eff6daebab6f95b0b49e6e6a58168073fb (patch) | |
tree | 7defa199f48a34787f980b6400d8bbaa9380039a /pygments/lexers/apl.py | |
parent | e09d4e0cf23d7c6069ddc690942ceb4cd23fd556 (diff) | |
parent | b2c91c70ee536b0472100d1273818f8bb45529fe (diff) | |
download | pygments-git-bug/angular-html.tar.gz |
Merge branch 'master' into bug/angular-htmlbug/angular-html
# Conflicts:
# tests/test_shell.py
Diffstat (limited to 'pygments/lexers/apl.py')
-rw-r--r-- | pygments/lexers/apl.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/pygments/lexers/apl.py b/pygments/lexers/apl.py index 68c4ffe1..4e2de92c 100644 --- a/pygments/lexers/apl.py +++ b/pygments/lexers/apl.py @@ -35,7 +35,7 @@ class APLLexer(RegexLexer): # Comment # ======= # '⍝' is traditional; '#' is supported by GNU APL and NGN (but not Dyalog) - (u'[⍝#].*$', Comment.Single), + (r'[⍝#].*$', Comment.Single), # # Strings # ======= @@ -46,7 +46,7 @@ class APLLexer(RegexLexer): # =========== # This token type is used for diamond and parenthesis # but not for bracket and ; (see below) - (u'[⋄◇()]', Punctuation), + (r'[⋄◇()]', Punctuation), # # Array indexing # ============== @@ -57,45 +57,45 @@ class APLLexer(RegexLexer): # Distinguished names # =================== # following IBM APL2 standard - (u'⎕[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 - # (u'[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 - (u'[A-Za-zΔ∆⍙][A-Za-zΔ∆⍙_¯0-9]*', Name.Variable), + (r'[A-Za-zΔ∆⍙][A-Za-zΔ∆⍙_¯0-9]*', Name.Variable), # # Numbers # ======= - (u'¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞)' - u'([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 # ========== - (u'[\\.\\\\\\/⌿⍀¨⍣⍨⍠⍤∘⌸&⌶@⌺⍥⍛⍢]', Name.Attribute), # closest token type - (u'[+\\-×÷⌈⌊∣|⍳?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⌸⍯↗⊆⊇⍸√⌾…⍮]', + (r'[\.\\\/⌿⍀¨⍣⍨⍠⍤∘⌸&⌶@⌺⍥⍛⍢]', Name.Attribute), # closest token type + (r'[+\-×÷⌈⌊∣|⍳?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⌸⍯↗⊆⊇⍸√⌾…⍮]', Operator), # # Constant # ======== - (u'⍬', Name.Constant), + (r'⍬', Name.Constant), # # Quad symbol # =========== - (u'[⎕⍞]', Name.Variable.Global), + (r'[⎕⍞]', Name.Variable.Global), # # Arrows left/right # ================= - (u'[←→]', Keyword.Declaration), + (r'[←→]', Keyword.Declaration), # # D-Fn # ==== - (u'[⍺⍵⍶⍹∇:]', Name.Builtin.Pseudo), + (r'[⍺⍵⍶⍹∇:]', Name.Builtin.Pseudo), (r'[{}]', Keyword.Type), ], } |