nasm improvements

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2013-07-28 22:28:39 -04:00
parent c53d9e4584
commit 13f4401259
1 changed files with 40 additions and 8 deletions

View File

@ -51,20 +51,52 @@ class NasmDisassembleFile(Method):
w.application.data_buffer(bufname, output, switch_to=True, w.application.data_buffer(bufname, output, switch_to=True,
modename=modename) modename=modename)
# white is for delimiters, operators, numbers
default = ('default', 'default')
# magenta is for keywords/builtins
lo_magenta = ('magenta202', 'default')
hi_magenta = ('magenta414', 'default')
# red is for comments
lo_red = ('red300', 'default')
hi_red = ('red511', 'default')
# orange is for macro definitions, headers and constants
hi_orange = ('yellow531', 'default')
lo_orange = ('yellow520', 'default')
# yellow is for parts of macros
hi_yellow = ('yellow551', 'default')
lo_yellow = ('yellow330', 'default')
# green is for strings and characters
lo_green = ('green030', 'default')
hi_green = ('green050', 'default')
# cyan is for types
lo_cyan = ('cyan033', 'default')
hi_cyan = ('cyan155', 'default')
# blue is definitions, functions and some macros
lo_blue = ('blue113', 'default')
hi_blue = ('blue225', 'default')
class Nasm(Fundamental): class Nasm(Fundamental):
name = 'nasm' name = 'nasm'
extensions = ['.s'] extensions = ['.s']
grammar = NasmGrammar grammar = NasmGrammar
commentc = ';' commentc = ';'
colors = { colors = {
'nasm.address': ('cyan', 'default'), 'nasm.address': hi_cyan,
'nasm.pseudo': ('cyan', 'default'), 'nasm.pseudo': hi_cyan,
'nasm.keyword': ('cyan', 'default'), 'nasm.keyword': hi_cyan,
'nasm.macro': ('blue', 'default'), 'nasm.macro': hi_blue,
'nasm.register': ('yellow', 'default'), 'nasm.register': hi_yellow,
'nasm.instruction': ('magenta', 'default'), 'nasm.instruction': hi_magenta,
'nasm.label': ('blue', 'default'), 'nasm.label': hi_blue,
'nasm.integer': ('green', 'default'), 'nasm.integer': hi_green,
'nasm.identifier': hi_orange,
} }
_bindings = { _bindings = {
'close-paren': (')',), 'close-paren': (')',),