parent
c53d9e4584
commit
13f4401259
48
mode/nasm.py
48
mode/nasm.py
|
@ -51,20 +51,52 @@ class NasmDisassembleFile(Method):
|
|||
w.application.data_buffer(bufname, output, switch_to=True,
|
||||
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):
|
||||
name = 'nasm'
|
||||
extensions = ['.s']
|
||||
grammar = NasmGrammar
|
||||
commentc = ';'
|
||||
colors = {
|
||||
'nasm.address': ('cyan', 'default'),
|
||||
'nasm.pseudo': ('cyan', 'default'),
|
||||
'nasm.keyword': ('cyan', 'default'),
|
||||
'nasm.macro': ('blue', 'default'),
|
||||
'nasm.register': ('yellow', 'default'),
|
||||
'nasm.instruction': ('magenta', 'default'),
|
||||
'nasm.label': ('blue', 'default'),
|
||||
'nasm.integer': ('green', 'default'),
|
||||
'nasm.address': hi_cyan,
|
||||
'nasm.pseudo': hi_cyan,
|
||||
'nasm.keyword': hi_cyan,
|
||||
'nasm.macro': hi_blue,
|
||||
'nasm.register': hi_yellow,
|
||||
'nasm.instruction': hi_magenta,
|
||||
'nasm.label': hi_blue,
|
||||
'nasm.integer': hi_green,
|
||||
'nasm.identifier': hi_orange,
|
||||
}
|
||||
_bindings = {
|
||||
'close-paren': (')',),
|
||||
|
|
Loading…
Reference in New Issue