diff options
author | Alex Brick <bricka@ccs.neu.edu> | 2007-10-24 00:00:00 +0000 |
---|---|---|
committer | Able Scraper <scraper@vim-scripts.org> | 2010-10-17 18:53:33 -0700 |
commit | 7e24f6b7ce82f3ad1f4429de9077c0b0aa34a893 (patch) | |
tree | 50ce347f5ab41891b348b00e28f4465aa7eaedbc /syntax | |
parent | 972b78eb14789580b1cf075ca58cc85bfceb2ee1 (diff) | |
download | mips.vim-7e24f6b7ce82f3ad1f4429de9077c0b0aa34a893.tar.gz |
Version 1.0.1
A minor fix to enable 6.x compatibility (noticed and patched by Jarmo Jaakkola), and a fix to hexadecimal numbers.
Diffstat (limited to 'syntax')
-rw-r--r-- | syntax/mips.vim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/syntax/mips.vim b/syntax/mips.vim index e8d81b5..325f1dd 100644 --- a/syntax/mips.vim +++ b/syntax/mips.vim @@ -14,7 +14,7 @@ syntax case match syntax match mipsComment /#.*/ syntax match mipsNumber /\<[-]\?\d\+\>/ " Decimal numbers -syntax match mipsNumber /\<-\?0\(x\|X\)\d\+\>/ " Hex numbers +syntax match mipsNumber /\<-\?0\(x\|X\)[0-9a-fA-F]\+\>/ " Hex numbers syntax region mipsString start=/"/ skip=/\\"/ end=/"/ syntax match mipsLabelColon /:/ contained syntax match mipsLabel /\w\+:/ contains=mipsLabelColon @@ -52,12 +52,14 @@ syntax match mipsRegister "\$sp" syntax match mipsRegister "\$fp" syntax match mipsRegister "\$ra" -for i in range(0, 31) +let i = 0 +while i < 32 " This is for the regular registers execute 'syntax match mipsRegister "\$' . i . '\(\d\+\)\@!"' " And this is for the FP registers execute 'syntax match mipsRegister "\$f' . i . '\(\d\+\)\@!"' -endfor + let i = i + 1 +endwhile " Directives syntax match mipsDirective "\.2byte" |