summaryrefslogtreecommitdiffstats
path: root/syntax/c.vim
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/c.vim')
-rw-r--r--syntax/c.vim7
1 files changed, 6 insertions, 1 deletions
diff --git a/syntax/c.vim b/syntax/c.vim
index 00b1a059..8f53efa4 100644
--- a/syntax/c.vim
+++ b/syntax/c.vim
@@ -184,6 +184,11 @@ syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumbe
syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
"hex number
syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
+if s:ft ==# 'cpp' && !exists("cpp_no_cpp14")
+ syn match cNumber display contained "\d\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
+ syn match cNumber display contained "0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
+ syn match cNumber display contained "0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
+endif
" Flag the first zero of an octal number as something special
syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero
syn match cOctalZero display contained "\<0"
@@ -297,7 +302,7 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
syn keyword cConstant SCHAR_MIN SINT_MIN SLONG_MIN SSHRT_MIN
syn keyword cConstant SCHAR_MAX SINT_MAX SLONG_MAX SSHRT_MAX
if !exists("c_no_c99")
- syn keyword cConstant __func__
+ syn keyword cConstant __func__ __VA_ARGS__
syn keyword cConstant LLONG_MIN LLONG_MAX ULLONG_MAX
syn keyword cConstant INT8_MIN INT16_MIN INT32_MIN INT64_MIN
syn keyword cConstant INT8_MAX INT16_MAX INT32_MAX INT64_MAX