misc/vim: highlight the new Int literals
authorAlexis Laferrière <alexis.laf@xymus.net>
Thu, 30 Jul 2015 13:54:11 +0000 (09:54 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Thu, 30 Jul 2015 15:59:36 +0000 (11:59 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

misc/vim/syntax/nit.vim

index 9c3ede7..2930d81 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*"