From 5b77877888162f4e415fe9a7b8c5e9fb5dfb6ee1 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 27 Sep 2017 20:43:42 +0200 Subject: Add syntax files from upstream vim repository --- syntax/kwt.vim | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 syntax/kwt.vim (limited to 'syntax/kwt.vim') diff --git a/syntax/kwt.vim b/syntax/kwt.vim new file mode 100644 index 00000000..5efeda86 --- /dev/null +++ b/syntax/kwt.vim @@ -0,0 +1,74 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vim') == -1 + +" Vim syntax file +" Language: kimwitu++ +" Maintainer: Michael Piefel +" Last Change: 2 May 2001 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Read the C++ syntax to start with +runtime! syntax/cpp.vim +unlet b:current_syntax + +" kimwitu++ extentions + +" Don't stop at eol, messes around with CPP mode, but gives line spanning +" strings in unparse rules +syn region cCppString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat +syn keyword cType integer real casestring nocasestring voidptr list +syn keyword cType uview rview uview_enum rview_enum + +" avoid unparsing rule sth:view being scanned as label +syn clear cUserCont +syn match cUserCont "^\s*\I\i*\s*:$" contains=cUserLabel contained +syn match cUserCont ";\s*\I\i*\s*:$" contains=cUserLabel contained +syn match cUserCont "^\s*\I\i*\s*:[^:]"me=e-1 contains=cUserLabel contained +syn match cUserCont ";\s*\I\i*\s*:[^:]"me=e-1 contains=cUserLabel contained + +" highlight phylum decls +syn match kwtPhylum "^\I\i*:$" +syn match kwtPhylum "^\I\i*\s*{\s*\(!\|\I\)\i*\s*}\s*:$" + +syn keyword kwtStatement with foreach afterforeach provided +syn match kwtDecl "%\(uviewvar\|rviewvar\)" +syn match kwtDecl "^%\(uview\|rview\|ctor\|dtor\|base\|storageclass\|list\|attr\|member\|option\)" +syn match kwtOption "no-csgio\|no-unparse\|no-rewrite\|no-printdot\|no-hashtables\|smart-pointer\|weak-pointer" +syn match kwtSep "^%}$" +syn match kwtSep "^%{\(\s\+\I\i*\)*$" +syn match kwtCast "\