misc: update highlighters and indenters
[nit.git] / misc / vim / syntax / nit.vim
index 9c3ede7..b72ee52 100644 (file)
@@ -36,8 +36,9 @@ syn match NITExprSubst "{\([^}]\|\n\)*}" contained
 syn match NITExprSubstLong "\\." contained
 syn match NITExprSubstLong "{*\zs{{{\([^}]\|\n\)*}}}\ze}*" contained
 
-" Numbers and ASCII Codes
-syn match NITNumber "\<\(\d\+\.\d\+\|\d\+\)\>"
+" Numbers
+syn match NITNumber "\<\([0-9_]\+\|0[bB][01_]\+\|0[oO][0-7_]\+\|0[xX][0-9a-fA-F_]\+\)\([iu]\(8\|16\|32\)\)\?\>"
+syn match NITNumber "\<[0-9_]\+\.[0-9_]\+\>"
 
 " Identifiers
 syn match NITClass             "\<\u\w*"
@@ -56,7 +57,7 @@ syn match NITClosure "!\h\w*"
 
 " Fallback highlight keywords
 syn match NITNull "\<\(null\)\>"
-syn match NITControl "\<\(init\|end\|not null\|not\|var\|do\|then\|else\|loop\|is\)\>"
+syn match NITControl "\<\(init\|end\|not null\|not\|var\|do\|then\|catch\|else\|loop\|is\)\>"
 syn match NITKeyword "\<\(super\)\>"
 " Unmatchning error
 syn match Error "\<end\>"
@@ -87,7 +88,7 @@ syn match  NITComment "#.*" contains=NITTodo,@Spell
 " Keywords
 syn keyword NITKeyword  abstract intern new
 syn keyword NITDefine   private public protected intrude readable writable redef
-syn keyword NITControl   if while for assert and or in as isa once break continue return abort
+syn keyword NITControl   if while for with assert and or in as isa once break continue return abort
 syn keyword NITClass     nullable
 syn keyword NITInclude   special
 syn keyword NITTodo      FIXME NOTE TODO XXX contained