Add highlighting for STL bits.

This commit is contained in:
Imperial Cryptography Bureau
2017-08-28 11:20:30 -04:00
parent 17cae3fdea
commit 8e35f24924

View File

@ -14,14 +14,23 @@ syn keyword cppStatement static_assert
syn keyword cxxConstants nullptr syn keyword cxxConstants nullptr
syn match cxxConstants "\<C::[A-Za-z_][A-Z_a-z0-9]*\>"
syn match cxxConstants "\<k[A-Z][A-Za-z_][A-Z_a-z0-9]*\>"
syn keyword cxxExceptionNames Exception Exceptions syn keyword cxxExceptionNames Exception Exceptions
syn match cxxExceptionNames "\<[A-Z][A-Za-z0-9_]*Exception\>" syn match cxxExceptionNames "\<[A-Z][A-Za-z0-9_]*Exception\>"
syn keyword cxxErrorNames Error Errors syn keyword cxxErrorNames Error Errors
syn match cxxErrorNames "\<[A-Z][A-Za-z0-9_]*Error\>" syn match cxxErrorNames "\<[A-Z][A-Za-z0-9_]*Error\>"
syn match cxxCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1 syn match cxxCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*\(<\)\@="
syn match cxxCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
syn match cxxStlTypes "\(\<std::\)\@<=\(string\|\(io\?\|o\)stream\)\>"
syn match cxxStlTypes "\(\<std::\)\@<=vector\(<\)\@="
syn match cxxStlTypes "\(std::\)\@<=\(vector\|array\|deque\|list\|queue\|stack\|\(\|\(multi\|unordered\)_\)\(set\|map\)\)\(<\)\@="
syn match cxxStlPrefix "\<std\(::\)\@="
" Define the default highlighting. " Define the default highlighting.
@ -45,6 +54,9 @@ if version >= 508 || !exists("did_cxx_syntax_inits")
HiLink cxxErrorNames Error HiLink cxxErrorNames Error
HiLink cxxDebug Debug HiLink cxxDebug Debug
HiLink cxxConstants Constant HiLink cxxConstants Constant
HiLink cxxNamedConstant Constant
HiLink cxxStlTypes Object
HiLink cxxStlPrefix Caller
delcommand HiLink delcommand HiLink
endif endif