annotate runtime/syntax/kwt.vim @ 7547:567e027a3ea1 v7.4.1074

commit https://github.com/vim/vim/commit/5fa4d448fb717874b6619bcda62e42190702997c Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 10 13:25:55 2016 +0100 patch 7.4.1074 Problem: Warning from VX2015 compiler. Solution: Add a type cast. (Mike Williams)
author Christian Brabandt <cb@256bit.org>
date Sun, 10 Jan 2016 13:30:05 +0100
parents 91e53bcb7946
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: kimwitu++
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 " Maintainer: Michael Piefel <entwurf@piefel.de>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2 May 2001
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " Read the C++ syntax to start with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 source <sfile>:p:h/cpp.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 runtime! syntax/cpp.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " kimwitu++ extentions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 " Don't stop at eol, messes around with CPP mode, but gives line spanning
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " strings in unparse rules
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn region cCppString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword cType integer real casestring nocasestring voidptr list
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword cType uview rview uview_enum rview_enum
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " avoid unparsing rule sth:view being scanned as label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn clear cUserCont
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match cUserCont "^\s*\I\i*\s*:$" contains=cUserLabel contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match cUserCont ";\s*\I\i*\s*:$" contains=cUserLabel contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match cUserCont "^\s*\I\i*\s*:[^:]"me=e-1 contains=cUserLabel contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match cUserCont ";\s*\I\i*\s*:[^:]"me=e-1 contains=cUserLabel contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " highlight phylum decls
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match kwtPhylum "^\I\i*:$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match kwtPhylum "^\I\i*\s*{\s*\(!\|\I\)\i*\s*}\s*:$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword kwtStatement with foreach afterforeach provided
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match kwtDecl "%\(uviewvar\|rviewvar\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match kwtDecl "^%\(uview\|rview\|ctor\|dtor\|base\|storageclass\|list\|attr\|member\|option\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match kwtOption "no-csgio\|no-unparse\|no-rewrite\|no-printdot\|no-hashtables\|smart-pointer\|weak-pointer"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match kwtSep "^%}$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match kwtSep "^%{\(\s\+\I\i*\)*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match kwtCast "\<phylum_cast\s*<"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match kwtCast "\<phylum_cast\s*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " match views, remove paren error in brackets
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn clear cErrInBracket
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn match cErrInBracket contained ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match kwtViews "\(\[\|<\)\@<=[ [:alnum:]_]\{-}:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 " match rule bodies
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn region kwtUnpBody transparent keepend extend fold start="->\s*\[" start="^\s*\[" skip="\$\@<!{\_.\{-}\$\@<!}" end="\s]\s\=;\=$" end="^]\s\=;\=$" end="}]\s\=;\=$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn region kwtRewBody transparent keepend extend fold start="->\s*<" start="^\s*<" end="\s>\s\=;\=$" end="^>\s\=;\=$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 if version >= 508 || !exists("did_kwt_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 let did_kwt_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink kwtStatement cppStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink kwtDecl cppStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink kwtCast cppStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink kwtSep Delimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink kwtViews Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink kwtPhylum Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink kwtOption PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 "HiLink cText Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn sync lines=300
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 let b:current_syntax = "kwt"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 " vim: ts=8