diff options
author | Georg Brandl <georg@python.org> | 2014-10-08 09:21:15 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-10-08 09:21:15 +0200 |
commit | 444fb6fd9b3492040a36fcca672fee8175f8d603 (patch) | |
tree | 2bd411ca78decf276b95dc6b1788e594b2e35287 /pygments/lexers/asm.py | |
parent | 491fec23ef01687906f5d71ee718522cd2917926 (diff) | |
parent | c1bfe4eed3805d3556bffa3c6b9cc2d3f6976205 (diff) | |
download | pygments-444fb6fd9b3492040a36fcca672fee8175f8d603.tar.gz |
Merged in leodemoura/pygments-main (pull request #399)
Diffstat (limited to 'pygments/lexers/asm.py')
-rw-r--r-- | pygments/lexers/asm.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/pygments/lexers/asm.py b/pygments/lexers/asm.py index f995264c..f16dbadd 100644 --- a/pygments/lexers/asm.py +++ b/pygments/lexers/asm.py @@ -12,12 +12,14 @@ import re from pygments.lexer import RegexLexer, include, bygroups, using, DelegatingLexer -from pygments.lexers.compiled import DLexer, CppLexer, CLexer +from pygments.lexers.c_cpp import CppLexer, CLexer +from pygments.lexers.d import DLexer from pygments.token import Text, Name, Number, String, Comment, Punctuation, \ - Other, Keyword, Operator + Other, Keyword, Operator -__all__ = ['GasLexer', 'ObjdumpLexer','DObjdumpLexer', 'CppObjdumpLexer', - 'CObjdumpLexer', 'LlvmLexer', 'NasmLexer', 'NasmObjdumpLexer', 'Ca65Lexer'] +__all__ = ['GasLexer', 'ObjdumpLexer', 'DObjdumpLexer', 'CppObjdumpLexer', + 'CObjdumpLexer', 'LlvmLexer', 'NasmLexer', 'NasmObjdumpLexer', + 'Ca65Lexer'] class GasLexer(RegexLexer): @@ -154,11 +156,9 @@ class ObjdumpLexer(RegexLexer): filenames = ['*.objdump'] mimetypes = ['text/x-objdump'] - tokens = _objdump_lexer_tokens(GasLexer) - class DObjdumpLexer(DelegatingLexer): """ For the output of 'objdump -Sr on compiled D files' @@ -220,11 +220,11 @@ class LlvmLexer(RegexLexer): include('keyword'), - (r'%' + identifier, Name.Variable),#Name.Identifier.Local), - (r'@' + identifier, Name.Variable.Global),#Name.Identifier.Global), - (r'%\d+', Name.Variable.Anonymous),#Name.Identifier.Anonymous), - (r'@\d+', Name.Variable.Global),#Name.Identifier.Anonymous), - (r'#\d+', Name.Variable.Global),#Name.Identifier.Global), + (r'%' + identifier, Name.Variable), + (r'@' + identifier, Name.Variable.Global), + (r'%\d+', Name.Variable.Anonymous), + (r'@\d+', Name.Variable.Global), + (r'#\d+', Name.Variable.Global), (r'!' + identifier, Name.Variable), (r'!\d+', Name.Variable.Anonymous), (r'c?' + string, String), @@ -402,7 +402,7 @@ class Ca65Lexer(RegexLexer): .. versionadded:: 1.6 """ - name = 'ca65' + name = 'ca65 assembler' aliases = ['ca65'] filenames = ['*.s'] @@ -424,7 +424,7 @@ class Ca65Lexer(RegexLexer): (r'\$[0-9a-f]+|[0-9a-f]+h\b', Number.Hex), (r'\d+', Number.Integer), (r'%[01]+', Number.Bin), - (r'[#,.:()=]', Punctuation), + (r'[#,.:()=\[\]]', Punctuation), (r'[a-z_.@$][\w.@$]*', Name), ] } |