Mercurial > vim
annotate runtime/syntax/wml.vim @ 21062:c2a368193769 v8.2.1082
patch 8.2.1082: Coverity complains about ignoring dict_add() return value
Commit: https://github.com/vim/vim/commit/91639195eff7b29213a0a3c279ac46e46ac76edd
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 29 19:55:58 2020 +0200
patch 8.2.1082: Coverity complains about ignoring dict_add() return value
Problem: Coverity complains about ignoring dict_add() return value.
Solution: Add (void).
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 29 Jun 2020 20:00:04 +0200 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: WML - Website MetaLanguage | |
3 " Maintainer: Gerfried Fuchs <alfie@ist.org> | |
4 " Filenames: *.wml | |
5 " Last Change: 07 Feb 2002 | |
6 " URL: http://alfie.ist.org/software/vim/syntax/wml.vim | |
7 " | |
8 " Original Version: Craig Small <csmall@eye-net.com.au> | |
9 | |
10 " Comments are very welcome - but please make sure that you are commenting on | |
11 " the latest version of this file. | |
12 " SPAM is _NOT_ welcome - be ready to be reported! | |
13 | |
14 " If you are looking for the "Wireless Markup Language" syntax file, | |
15 " please take a look at the wap.vim file done by Ralf Schandl, soon in a | |
16 " vim-package around your corner :) | |
17 | |
18 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
19 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
20 if exists("b:current_syntax") |
7 | 21 finish |
22 endif | |
23 | |
24 | |
25 " A lot of the web stuff looks like HTML so we load that first | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
26 runtime! syntax/html.vim |
7 | 27 unlet b:current_syntax |
28 | |
29 if !exists("main_syntax") | |
30 let main_syntax = 'wml' | |
31 endif | |
32 | |
33 " special character | |
34 syn match wmlNextLine "\\$" | |
35 | |
36 " Redfine htmlTag | |
37 syn clear htmlTag | |
38 syn region htmlTag start=+<[^/<]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition | |
39 | |
40 " | |
41 " Add in extra Arguments used by wml | |
42 syn keyword htmlTagName contained gfont imgbg imgdot lowsrc | |
43 syn keyword htmlTagName contained navbar:define navbar:header | |
44 syn keyword htmlTagName contained navbar:footer navbar:prolog | |
45 syn keyword htmlTagName contained navbar:epilog navbar:button | |
46 syn keyword htmlTagName contained navbar:filter navbar:debug | |
47 syn keyword htmlTagName contained navbar:render | |
48 syn keyword htmlTagName contained preload rollover | |
49 syn keyword htmlTagName contained space hspace vspace over | |
50 syn keyword htmlTagName contained ps ds pi ein big sc spaced headline | |
51 syn keyword htmlTagName contained ue subheadline zwue verbcode | |
52 syn keyword htmlTagName contained isolatin pod sdf text url verbatim | |
53 syn keyword htmlTagName contained xtable | |
54 syn keyword htmlTagName contained csmap fsview import box | |
55 syn keyword htmlTagName contained case:upper case:lower | |
56 syn keyword htmlTagName contained grid cell info lang: logo page | |
57 syn keyword htmlTagName contained set-var restore | |
58 syn keyword htmlTagName contained array:push array:show set-var ifdef | |
59 syn keyword htmlTagName contained say m4 symbol dump enter divert | |
60 syn keyword htmlTagName contained toc | |
61 syn keyword htmlTagName contained wml card do refresh oneevent catch spawn | |
62 | |
63 " | |
64 " The wml arguments | |
65 syn keyword htmlArg contained adjust background base bdcolor bdspace | |
66 syn keyword htmlArg contained bdwidth complete copyright created crop | |
67 syn keyword htmlArg contained direction description domainname eperlfilter | |
68 syn keyword htmlArg contained file hint imgbase imgstar interchar interline | |
69 syn keyword htmlArg contained keephr keepindex keywords layout spacing | |
70 syn keyword htmlArg contained padding nonetscape noscale notag notypo | |
71 syn keyword htmlArg contained onload oversrc pos select slices style | |
72 syn keyword htmlArg contained subselected txtcol_select txtcol_normal | |
73 syn keyword htmlArg contained txtonly via | |
74 syn keyword htmlArg contained mode columns localsrc ordered | |
75 | |
76 | |
77 " Lines starting with an # are usually comments | |
78 syn match wmlComment "^\s*#.*" | |
79 " The different exceptions to comments | |
80 syn match wmlSharpBang "^#!.*" | |
81 syn match wmlUsed contained "\s\s*[A-Za-z:_-]*" | |
82 syn match wmlUse "^\s*#\s*use\s\+" contains=wmlUsed | |
83 syn match wmlInclude "^\s*#\s*include.+" | |
84 | |
85 syn region wmlBody contained start=+<<+ end=+>>+ | |
86 | |
87 syn match wmlLocationId contained "[A-Za-z]\+" | |
88 syn region wmlLocation start=+<<+ end=+>>+ contains=wmlLocationId | |
89 "syn region wmlLocation start=+{#+ end=+#}+ contains=wmlLocationId | |
90 "syn region wmlLocationed contained start=+<<+ end=+>>+ contains=wmlLocationId | |
91 | |
92 syn match wmlDivert "\.\.[a-zA-Z_]\+>>" | |
93 syn match wmlDivertEnd "<<\.\." | |
94 " new version | |
95 "syn match wmlDivert "{#[a-zA-Z_]\+#:" | |
96 "syn match wmlDivertEnd ":##}" | |
97 | |
98 syn match wmlDefineName contained "\s\+[A-Za-z-]\+" | |
99 syn region htmlTagName start="\<\(define-tag\|define-region\)" end="\>" contains=wmlDefineName | |
100 | |
101 " The perl include stuff | |
102 if main_syntax != 'perl' | |
103 " Perl script | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
104 syn include @wmlPerlScript syntax/perl.vim |
7 | 105 unlet b:current_syntax |
106 | |
107 syn region perlScript start=+<perl>+ keepend end=+</perl>+ contains=@wmlPerlScript,wmlPerlTag | |
108 " eperl between '<:' and ':>' -- Alfie [1999-12-26] | |
109 syn region perlScript start=+<:+ keepend end=+:>+ contains=@wmlPerlScript,wmlPerlTag | |
110 syn match wmlPerlTag contained "</*perl>" contains=wmlPerlTagN | |
111 syn keyword wmlPerlTagN contained perl | |
112 | |
113 hi link wmlPerlTag htmlTag | |
114 hi link wmlPerlTagN htmlStatement | |
115 endif | |
116 | |
117 " verbatim tags -- don't highlight anything in between -- Alfie [2002-02-07] | |
118 syn region wmlVerbatimText start=+<verbatim>+ keepend end=+</verbatim>+ contains=wmlVerbatimTag | |
119 syn match wmlVerbatimTag contained "</*verbatim>" contains=wmlVerbatimTagN | |
120 syn keyword wmlVerbatimTagN contained verbatim | |
121 hi link wmlVerbatimTag htmlTag | |
122 hi link wmlVerbatimTagN htmlStatement | |
123 | |
124 if main_syntax == "html" | |
125 syn sync match wmlHighlight groupthere NONE "</a-zA-Z]" | |
126 syn sync match wmlHighlight groupthere perlScript "<perl>" | |
127 syn sync match wmlHighlightSkip "^.*['\"].*$" | |
128 syn sync minlines=10 | |
129 endif | |
130 | |
131 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
132 " Only when an item doesn't have highlighting yet |
7 | 133 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
134 hi def link wmlNextLine Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
135 hi def link wmlUse Include |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
136 hi def link wmlUsed String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
137 hi def link wmlBody Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
138 hi def link wmlDiverted Label |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
139 hi def link wmlDivert Delimiter |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
140 hi def link wmlDivertEnd Delimiter |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
141 hi def link wmlLocationId Label |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
142 hi def link wmlLocation Delimiter |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
143 " hi def link wmlLocationed Delimiter |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
144 hi def link wmlDefineName String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
145 hi def link wmlComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
146 hi def link wmlInclude Include |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
147 hi def link wmlSharpBang PreProc |
7 | 148 |
149 | |
150 let b:current_syntax = "wml" |