diff options
Diffstat (limited to 'pygments/lexers/esoteric.py')
-rw-r--r-- | pygments/lexers/esoteric.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/pygments/lexers/esoteric.py b/pygments/lexers/esoteric.py index 150d930f..26222c9f 100644 --- a/pygments/lexers/esoteric.py +++ b/pygments/lexers/esoteric.py @@ -5,7 +5,7 @@ Lexers for esoteric languages. - :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -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. @@ -243,7 +245,7 @@ class AheuiLexer(RegexLexer): Aheui_ is esoteric language based on Korean alphabets. - .. _Aheui:: http://aheui.github.io/ + .. _Aheui: http://aheui.github.io/ """ |