Mercurial > vim
annotate runtime/syntax/named.vim @ 33230:d64e4106dd91 v9.0.1889
patch 9.0.1889: Vim9 static tests fail
Commit: https://github.com/vim/vim/commit/0405405536f06a3bf384757be4affa9c1a07bdcd
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sun Sep 10 18:12:56 2023 +0200
patch 9.0.1889: Vim9 static tests fail
Problem: Vim9 static tests fail
Solution: Fix tests, make CI happy ;)
closes: #13064
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 10 Sep 2023 18:15:05 +0200 |
parents | 375a7ecdb351 |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
1121 | 2 " Language: BIND configuration file |
3 " Maintainer: Nick Hibma <nick@van-laarhoven.org> | |
18343 | 4 " Last Change: 2019 Oct 08 |
1121 | 5 " Filenames: named.conf, rndc.conf |
6 " Location: http://www.van-laarhoven.org/vim/syntax/named.vim | |
7 | 7 " |
1121 | 8 " Previously maintained by glory hump <rnd@web-drive.ru> and updated by Marcin |
9 " Dalecki. | |
10 " | |
11 " This file could do with a lot of improvements, so comments are welcome. | |
12 " Please submit the named.conf (segment) with any comments. | |
13 " | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
1121
diff
changeset
|
14 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
1121
diff
changeset
|
15 if exists("b:current_syntax") |
7 | 16 finish |
17 endif | |
18 | |
19 syn case match | |
20 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
1121
diff
changeset
|
21 setlocal iskeyword=.,-,48-58,A-Z,a-z,_ |
7 | 22 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
1121
diff
changeset
|
23 syn sync match namedSync grouphere NONE "^(zone|controls|acl|key)" |
1121 | 24 |
7 | 25 let s:save_cpo = &cpo |
26 set cpo-=C | |
27 | |
28 " BIND configuration file | |
29 | |
30 syn match namedComment "//.*" | |
44 | 31 syn match namedComment "#.*" |
7 | 32 syn region namedComment start="/\*" end="\*/" |
33 syn region namedString start=/"/ end=/"/ contained | |
44 | 34 " --- omitted trailing semicolon |
35 syn match namedError /[^;{#]$/ | |
7 | 36 |
37 " --- top-level keywords | |
38 | |
39 syn keyword namedInclude include nextgroup=namedString skipwhite | |
40 syn keyword namedKeyword acl key nextgroup=namedIntIdent skipwhite | |
41 syn keyword namedKeyword server nextgroup=namedIdentifier skipwhite | |
42 syn keyword namedKeyword controls nextgroup=namedSection skipwhite | |
43 syn keyword namedKeyword trusted-keys nextgroup=namedIntSection skipwhite | |
44 syn keyword namedKeyword logging nextgroup=namedLogSection skipwhite | |
45 syn keyword namedKeyword options nextgroup=namedOptSection skipwhite | |
46 syn keyword namedKeyword zone nextgroup=namedZoneString skipwhite | |
47 | |
48 " --- Identifier: name of following { ... } Section | |
49 syn match namedIdentifier contained /\k\+/ nextgroup=namedSection skipwhite | |
50 " --- IntIdent: name of following IntSection | |
51 syn match namedIntIdent contained /"\=\k\+"\=/ nextgroup=namedIntSection skipwhite | |
52 | |
53 " --- Section: { ... } clause | |
54 syn region namedSection contained start=+{+ end=+};+ contains=namedSection,namedIntKeyword | |
55 | |
56 " --- IntSection: section that does not contain other sections | |
18343 | 57 syn region namedIntSection contained start=+{+ end=+}+ contains=namedIntKeyword,namedError,namedComment |
7 | 58 |
59 " --- IntKeyword: keywords contained within `{ ... }' sections only | |
60 " + these keywords are contained within `key' and `acl' sections | |
61 syn keyword namedIntKeyword contained key algorithm | |
62 syn keyword namedIntKeyword contained secret nextgroup=namedString skipwhite | |
63 | |
64 " + these keywords are contained within `server' section only | |
65 syn keyword namedIntKeyword contained bogus support-ixfr nextgroup=namedBool,namedNotBool skipwhite | |
66 syn keyword namedIntKeyword contained transfers nextgroup=namedNumber,namedNotNumber skipwhite | |
67 syn keyword namedIntKeyword contained transfer-format | |
68 syn keyword namedIntKeyword contained keys nextgroup=namedIntSection skipwhite | |
69 | |
70 " + these keywords are contained within `controls' section only | |
71 syn keyword namedIntKeyword contained inet nextgroup=namedIPaddr,namedIPerror skipwhite | |
72 syn keyword namedIntKeyword contained unix nextgroup=namedString skipwhite | |
73 syn keyword namedIntKeyword contained port perm owner group nextgroup=namedNumber,namedNotNumber skipwhite | |
74 syn keyword namedIntKeyword contained allow nextgroup=namedIntSection skipwhite | |
75 | |
1121 | 76 " + these keywords are contained within `update-policy' section only |
77 syn keyword namedIntKeyword contained grant nextgroup=namedString skipwhite | |
78 syn keyword namedIntKeyword contained name self subdomain wildcard nextgroup=namedString skipwhite | |
79 syn keyword namedIntKeyword TXT A PTR NS SOA A6 CNAME MX ANY skipwhite | |
80 | |
7 | 81 " --- options |
82 syn region namedOptSection contained start=+{+ end=+};+ contains=namedOption,namedCNOption,namedComment,namedParenError | |
83 | |
84 syn keyword namedOption contained version directory | |
85 \ nextgroup=namedString skipwhite | |
86 syn keyword namedOption contained named-xfer dump-file pid-file | |
87 \ nextgroup=namedString skipwhite | |
88 syn keyword namedOption contained mem-statistics-file statistics-file | |
89 \ nextgroup=namedString skipwhite | |
90 syn keyword namedOption contained auth-nxdomain deallocate-on-exit | |
91 \ nextgroup=namedBool,namedNotBool skipwhite | |
92 syn keyword namedOption contained dialup fake-iquery fetch-glue | |
93 \ nextgroup=namedBool,namedNotBool skipwhite | |
94 syn keyword namedOption contained has-old-clients host-statistics | |
95 \ nextgroup=namedBool,namedNotBool skipwhite | |
96 syn keyword namedOption contained maintain-ixfr-base multiple-cnames | |
97 \ nextgroup=namedBool,namedNotBool skipwhite | |
98 syn keyword namedOption contained notify recursion rfc2308-type1 | |
99 \ nextgroup=namedBool,namedNotBool skipwhite | |
100 syn keyword namedOption contained use-id-pool treat-cr-as-space | |
101 \ nextgroup=namedBool,namedNotBool skipwhite | |
102 syn keyword namedOption contained also-notify forwarders | |
1121 | 103 \ nextgroup=namedIPlist skipwhite |
7 | 104 syn keyword namedOption contained forward check-names |
1121 | 105 syn keyword namedOption contained allow-query allow-transfer allow-recursion |
106 \ nextgroup=namedAML skipwhite | |
7 | 107 syn keyword namedOption contained blackhole listen-on |
108 \ nextgroup=namedIntSection skipwhite | |
109 syn keyword namedOption contained lame-ttl max-transfer-time-in | |
110 \ nextgroup=namedNumber,namedNotNumber skipwhite | |
111 syn keyword namedOption contained max-ncache-ttl min-roots | |
112 \ nextgroup=namedNumber,namedNotNumber skipwhite | |
113 syn keyword namedOption contained serial-queries transfers-in | |
114 \ nextgroup=namedNumber,namedNotNumber skipwhite | |
115 syn keyword namedOption contained transfers-out transfers-per-ns | |
116 syn keyword namedOption contained transfer-format | |
117 syn keyword namedOption contained transfer-source | |
118 \ nextgroup=namedIPaddr,namedIPerror skipwhite | |
119 syn keyword namedOption contained max-ixfr-log-size | |
120 \ nextgroup=namedNumber,namedNotNumber skipwhite | |
121 syn keyword namedOption contained coresize datasize files stacksize | |
122 syn keyword namedOption contained cleaning-interval interface-interval statistics-interval heartbeat-interval | |
123 \ nextgroup=namedNumber,namedNotNumber skipwhite | |
124 syn keyword namedOption contained topology sortlist rrset-order | |
125 \ nextgroup=namedIntSection skipwhite | |
126 | |
127 syn match namedOption contained /\<query-source\s\+.*;/he=s+12 contains=namedQSKeywords | |
128 syn keyword namedQSKeywords contained address port | |
129 syn match namedCNOption contained /\<check-names\s\+.*;/he=s+11 contains=namedCNKeywords | |
130 syn keyword namedCNKeywords contained fail warn ignore master slave response | |
131 | |
132 " --- logging facilities | |
133 syn region namedLogSection contained start=+{+ end=+};+ contains=namedLogOption | |
134 syn keyword namedLogOption contained channel nextgroup=namedIntIdent skipwhite | |
135 syn keyword namedLogOption contained category nextgroup=namedIntIdent skipwhite | |
136 syn keyword namedIntKeyword contained syslog null versions size severity | |
137 syn keyword namedIntKeyword contained file nextgroup=namedString skipwhite | |
138 syn keyword namedIntKeyword contained print-category print-severity print-time nextgroup=namedBool,namedNotBool skipwhite | |
139 | |
140 " --- zone section | |
141 syn region namedZoneString contained oneline start=+"+ end=+"+ skipwhite | |
142 \ contains=namedDomain,namedIllegalDom | |
143 \ nextgroup=namedZoneClass,namedZoneSection | |
144 syn keyword namedZoneClass contained in hs hesiod chaos | |
145 \ IN HS HESIOD CHAOS | |
146 \ nextgroup=namedZoneSection skipwhite | |
147 | |
148 syn region namedZoneSection contained start=+{+ end=+};+ contains=namedZoneOpt,namedCNOption,namedComment,namedMasters,namedParenError | |
149 syn keyword namedZoneOpt contained file ixfr-base | |
150 \ nextgroup=namedString skipwhite | |
151 syn keyword namedZoneOpt contained notify dialup | |
152 \ nextgroup=namedBool,namedNotBool skipwhite | |
153 syn keyword namedZoneOpt contained pubkey forward | |
154 syn keyword namedZoneOpt contained max-transfer-time-in | |
155 \ nextgroup=namedNumber,namedNotNumber skipwhite | |
156 syn keyword namedZoneOpt contained type nextgroup=namedZoneType skipwhite | |
157 syn keyword namedZoneType contained master slave stub forward hint | |
158 | |
159 syn keyword namedZoneOpt contained masters forwarders | |
160 \ nextgroup=namedIPlist skipwhite | |
161 syn region namedIPlist contained start=+{+ end=+};+ contains=namedIPaddr,namedIPerror,namedParenError,namedComment | |
1121 | 162 syn keyword namedZoneOpt contained allow-update allow-query allow-transfer |
7 | 163 \ nextgroup=namedAML skipwhite |
1121 | 164 syn keyword namedZoneOpt contained update-policy |
165 \ nextgroup=namedIntSection skipwhite | |
7 | 166 |
167 " --- boolean parameter | |
168 syn match namedNotBool contained "[^ ;]\+" | |
169 syn keyword namedBool contained yes no true false 1 0 | |
170 | |
171 " --- number parameter | |
172 syn match namedNotNumber contained "[^ 0-9;]\+" | |
173 syn match namedNumber contained "\d\+" | |
174 | |
175 " --- address match list | |
1121 | 176 syn region namedAML contained start=+{+ end=+};+ contains=namedParenError,namedComment,namedString |
7 | 177 |
178 " --- IPs & Domains | |
179 syn match namedIPaddr contained /\<[0-9]\{1,3}\(\.[0-9]\{1,3}\)\{3};/he=e-1 | |
180 syn match namedDomain contained /\<[0-9A-Za-z][-0-9A-Za-z.]\+\>/ nextgroup=namedSpareDot | |
181 syn match namedDomain contained /"\."/ms=s+1,me=e-1 | |
182 syn match namedSpareDot contained /\./ | |
183 | |
184 " --- syntax errors | |
185 syn match namedIllegalDom contained /"\S*[^-A-Za-z0-9.[:space:]]\S*"/ms=s+1,me=e-1 | |
186 syn match namedIPerror contained /\<\S*[^0-9.[:space:];]\S*/ | |
187 syn match namedEParenError contained +{+ | |
188 syn match namedParenError +}\([^;]\|$\)+ | |
189 | |
190 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
1121
diff
changeset
|
191 " Only when an item doesn't have highlighting yet |
7 | 192 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
193 hi def link namedComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
194 hi def link namedInclude Include |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
195 hi def link namedKeyword Keyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
196 hi def link namedIntKeyword Keyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
197 hi def link namedIdentifier Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
198 hi def link namedIntIdent Identifier |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
1121
diff
changeset
|
199 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
200 hi def link namedString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
201 hi def link namedBool Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
202 hi def link namedNotBool Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
203 hi def link namedNumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
204 hi def link namedNotNumber Error |
7 | 205 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
206 hi def link namedOption namedKeyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
207 hi def link namedLogOption namedKeyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
208 hi def link namedCNOption namedKeyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
209 hi def link namedQSKeywords Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
210 hi def link namedCNKeywords Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
211 hi def link namedLogCategory Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
212 hi def link namedIPaddr Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
213 hi def link namedDomain Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
214 hi def link namedZoneOpt namedKeyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
215 hi def link namedZoneType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
216 hi def link namedParenError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
217 hi def link namedEParenError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
218 hi def link namedIllegalDom Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
219 hi def link namedIPerror Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
220 hi def link namedSpareDot Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
221 hi def link namedError Error |
7 | 222 |
223 | |
224 let &cpo = s:save_cpo | |
225 unlet s:save_cpo | |
226 | |
227 let b:current_syntax = "named" | |
228 | |
229 " vim: ts=17 |