diff options
author | Georg Brandl <georg@python.org> | 2017-01-22 20:27:58 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2017-01-22 20:27:58 +0100 |
commit | f9d97178624f11b597803206ba1d918da9c89532 (patch) | |
tree | 73ec1e1e0d5a451561453e73b8dcc1947cc52890 /pygments/lexers/esoteric.py | |
parent | 1f75c51afdbe281e0044ca5c5369e14fc5e0e8e1 (diff) | |
download | pygments-f9d97178624f11b597803206ba1d918da9c89532.tar.gz |
all: run regexlint, add a few more changelog entries
Diffstat (limited to 'pygments/lexers/esoteric.py')
-rw-r--r-- | pygments/lexers/esoteric.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pygments/lexers/esoteric.py b/pygments/lexers/esoteric.py index 54577bf9..793c28be 100644 --- a/pygments/lexers/esoteric.py +++ b/pygments/lexers/esoteric.py @@ -14,7 +14,7 @@ from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Error __all__ = ['BrainfuckLexer', 'BefungeLexer', 'RedcodeLexer', 'CAmkESLexer', - 'CapDLLexer', 'AheuiLexer'] + 'CapDLLexer', 'AheuiLexer'] class BrainfuckLexer(RegexLexer): @@ -155,14 +155,15 @@ class CapDLLexer(RegexLexer): shadow type names, but these instances are currently incorrectly highlighted as types. Supporting this would need a stateful lexer that is considered unnecessarily complex for now. + + .. versionadded:: 2.2 """ name = 'CapDL' aliases = ['capdl'] filenames = ['*.cdl'] tokens = { - 'root':[ - + 'root': [ # C pre-processor directive (r'^\s*#.*\n', Comment.Preproc), @@ -171,7 +172,7 @@ class CapDLLexer(RegexLexer): (r'/\*(.|\n)*?\*/', Comment), (r'(//|--).*\n', Comment), - (r'[<>\[\(\)\{\},:;=\]]', Punctuation), + (r'[<>\[(){},:;=\]]', Punctuation), (r'\.\.', Punctuation), (words(('arch', 'arm11', 'caps', 'child_of', 'ia32', 'irq', 'maps', @@ -187,7 +188,7 @@ class CapDLLexer(RegexLexer): 'prio', 'sp', 'R', 'RG', 'RX', 'RW', 'RWG', 'RWX', 'W', 'WG', 'WX', 'level', 'masked', 'master_reply', 'paddr', 'ports', 'reply', 'uncached'), suffix=r'\b'), - Keyword.Reserved), + Keyword.Reserved), # Literals (r'0[xX][\da-fA-F]+', Number.Hex), @@ -197,10 +198,11 @@ class CapDLLexer(RegexLexer): 'ipc_buffer_slot'), suffix=r'\b'), Number), # Identifiers - (r'[a-zA-Z_][-_@\.\w]*', Name), + (r'[a-zA-Z_][-@\.\w]*', Name), ], } + class RedcodeLexer(RegexLexer): """ A simple Redcode lexer based on ICWS'94. |