diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-08-11 11:09:22 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-08-11 11:09:22 -0700 |
commit | 76aace4625d4a2e0e1614acd0bea646f6db0f606 (patch) | |
tree | e93716ccfb23a1a6ea6275af31068c010c32deed /subx/subx.vim | |
parent | f39429b60dbceaa5ef4c2cf8a30d20fb58e3bb2e (diff) | |
download | mu-76aace4625d4a2e0e1614acd0bea646f6db0f606.tar.gz |
4505 - start warning on jumps without labels
As we climb the ladder of abstraction we'll gradually pull the ladder up behind ourselves.
Diffstat (limited to 'subx/subx.vim')
-rw-r--r-- | subx/subx.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/subx/subx.vim b/subx/subx.vim index 438ad732..309ebfec 100644 --- a/subx/subx.vim +++ b/subx/subx.vim @@ -24,3 +24,13 @@ let b:cmt_head = "#? " " comment token syntax match subxDelimiter / \. / | highlight link subxDelimiter Delimiter + +"" highlight low-level idioms in red as I provide more high-level replacements + +" Once we have labels, highlight raw displacement +highlight Warn ctermbg=brown ctermfg=black +call matchadd("Warn", '\c^\s*e8.*\<\(0x\)\?[0-9a-f]\+/disp32') " call +call matchadd("Warn", '\c^\s*e9.*\<\(0x\)\?[0-9a-f]\+/disp8') " unconditional jump disp8 +call matchadd("Warn", '\c^\s*7[45cdef].*\<\(0x\)\?[0-9a-f]\+/disp8') " conditional jump disp8 +call matchadd("Warn", '\c^\s*eb.*\<\(0x\)\?[0-9a-f]\+/disp16') " unconditional jump disp16 +call matchadd("Warn", '\c^\s*0f[^\s]*\s*8[45cdef].*\<\(0x\)\?[0-9a-f]\+/disp16') " conditional jump disp16 |