Mercurial > vim
annotate runtime/syntax/logtalk.vim @ 14535:2eecc8d1e8d9
Added tag v8.1.0280 for changeset 8fa7f5ff2649990988b1b43b0dcfadd8c414b56f
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 13 Aug 2018 23:00:06 +0200 |
parents | 5c5908e81e93 |
children | d46f974fd69e |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " | |
3 " Language: Logtalk | |
4 " Maintainer: Paulo Moura <pmoura@logtalk.org> | |
14519 | 5 " Last Change: August 3, 2018 |
7 | 6 |
7 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3312
diff
changeset
|
8 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3312
diff
changeset
|
9 if exists("b:current_syntax") |
7 | 10 finish |
11 endif | |
12 | |
3312 | 13 let s:cpo_save = &cpo |
14 set cpo&vim | |
7 | 15 |
16 " Logtalk is case sensitive: | |
17 | |
18 syn case match | |
19 | |
20 | |
21 " Logtalk variables | |
22 | |
23 syn match logtalkVariable "\<\(\u\|_\)\(\w\)*\>" | |
24 | |
25 | |
26 " Logtalk clause functor | |
27 | |
28 syn match logtalkOperator ":-" | |
29 | |
30 | |
31 " Logtalk quoted atoms and strings | |
32 | |
33 syn region logtalkString start=+"+ skip=+\\"+ end=+"+ | |
1668 | 34 syn region logtalkAtom start=+'+ skip=+\\'+ end=+'+ contains=logtalkEscapeSequence |
35 | |
36 syn match logtalkEscapeSequence contained "\\\([\\abfnrtv\"\']\|\(x[a-fA-F0-9]\+\|[0-7]\+\)\\\)" | |
7 | 37 |
38 | |
39 " Logtalk message sending operators | |
40 | |
41 syn match logtalkOperator "::" | |
1668 | 42 syn match logtalkOperator ":" |
7 | 43 syn match logtalkOperator "\^\^" |
44 | |
45 | |
46 " Logtalk external call | |
47 | |
48 syn region logtalkExtCall matchgroup=logtalkExtCallTag start="{" matchgroup=logtalkExtCallTag end="}" contains=ALL | |
49 | |
50 | |
51 " Logtalk opening entity directives | |
52 | |
2034 | 53 syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- object(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom,logtalkEntityRel,logtalkLineComment |
54 syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- protocol(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkEntityRel,logtalkLineComment | |
55 syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- category(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkEntityRel,logtalkLineComment | |
7 | 56 |
57 | |
58 " Logtalk closing entity directives | |
59 | |
308 | 60 syn match logtalkCloseEntityDir ":- end_object\." |
61 syn match logtalkCloseEntityDir ":- end_protocol\." | |
62 syn match logtalkCloseEntityDir ":- end_category\." | |
7 | 63 |
64 | |
65 " Logtalk entity relations | |
66 | |
1668 | 67 syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="instantiates(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained |
68 syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="specializes(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained | |
69 syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="extends(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained | |
70 syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="imports(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained | |
71 syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="implements(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained | |
72 syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="complements(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained | |
7 | 73 |
74 | |
75 " Logtalk directives | |
76 | |
3312 | 77 syn region logtalkDir matchgroup=logtalkDirTag start=":- if(" matchgroup=logtalkDirTag end=")\." contains=ALL |
78 syn region logtalkDir matchgroup=logtalkDirTag start=":- elif(" matchgroup=logtalkDirTag end=")\." contains=ALL | |
79 syn match logtalkDirTag ":- else\." | |
80 syn match logtalkDirTag ":- endif\." | |
214 | 81 syn region logtalkDir matchgroup=logtalkDirTag start=":- alias(" matchgroup=logtalkDirTag end=")\." contains=ALL |
3312 | 82 syn region logtalkDir matchgroup=logtalkDirTag start=":- coinductive(" matchgroup=logtalkDirTag end=")\." contains=ALL |
1668 | 83 syn region logtalkDir matchgroup=logtalkDirTag start=":- encoding(" matchgroup=logtalkDirTag end=")\." contains=ALL |
7 | 84 syn region logtalkDir matchgroup=logtalkDirTag start=":- initialization(" matchgroup=logtalkDirTag end=")\." contains=ALL |
85 syn region logtalkDir matchgroup=logtalkDirTag start=":- info(" matchgroup=logtalkDirTag end=")\." contains=ALL | |
214 | 86 syn region logtalkDir matchgroup=logtalkDirTag start=":- mode(" matchgroup=logtalkDirTag end=")\." contains=logtalkOperator, logtalkAtom |
7 | 87 syn region logtalkDir matchgroup=logtalkDirTag start=":- dynamic(" matchgroup=logtalkDirTag end=")\." contains=ALL |
14519 | 88 syn match logtalkDirTag ":- built_in\." |
7 | 89 syn match logtalkDirTag ":- dynamic\." |
90 syn region logtalkDir matchgroup=logtalkDirTag start=":- discontiguous(" matchgroup=logtalkDirTag end=")\." contains=ALL | |
214 | 91 syn region logtalkDir matchgroup=logtalkDirTag start=":- multifile(" matchgroup=logtalkDirTag end=")\." contains=ALL |
7 | 92 syn region logtalkDir matchgroup=logtalkDirTag start=":- public(" matchgroup=logtalkDirTag end=")\." contains=ALL |
93 syn region logtalkDir matchgroup=logtalkDirTag start=":- protected(" matchgroup=logtalkDirTag end=")\." contains=ALL | |
94 syn region logtalkDir matchgroup=logtalkDirTag start=":- private(" matchgroup=logtalkDirTag end=")\." contains=ALL | |
1668 | 95 syn region logtalkDir matchgroup=logtalkDirTag start=":- meta_predicate(" matchgroup=logtalkDirTag end=")\." contains=ALL |
3312 | 96 syn region logtalkDir matchgroup=logtalkDirTag start=":- meta_non_terminal(" matchgroup=logtalkDirTag end=")\." contains=ALL |
7 | 97 syn region logtalkDir matchgroup=logtalkDirTag start=":- op(" matchgroup=logtalkDirTag end=")\." contains=ALL |
3312 | 98 syn region logtalkDir matchgroup=logtalkDirTag start=":- set_logtalk_flag(" matchgroup=logtalkDirTag end=")\." contains=ALL |
1668 | 99 syn region logtalkDir matchgroup=logtalkDirTag start=":- synchronized(" matchgroup=logtalkDirTag end=")\." contains=ALL |
100 syn match logtalkDirTag ":- synchronized\." | |
7 | 101 syn region logtalkDir matchgroup=logtalkDirTag start=":- uses(" matchgroup=logtalkDirTag end=")\." contains=ALL |
1668 | 102 syn match logtalkDirTag ":- threaded\." |
7 | 103 |
104 | |
3312 | 105 " Prolog directives |
106 | |
107 syn region logtalkDir matchgroup=logtalkDirTag start=":- ensure_loaded(" matchgroup=logtalkDirTag end=")\." contains=ALL | |
108 syn region logtalkDir matchgroup=logtalkDirTag start=":- include(" matchgroup=logtalkDirTag end=")\." contains=ALL | |
109 syn region logtalkDir matchgroup=logtalkDirTag start=":- set_prolog_flag(" matchgroup=logtalkDirTag end=")\." contains=ALL | |
110 | |
111 | |
714 | 112 " Module directives |
113 | |
114 syn region logtalkDir matchgroup=logtalkDirTag start=":- module(" matchgroup=logtalkDirTag end=")\." contains=ALL | |
115 syn region logtalkDir matchgroup=logtalkDirTag start=":- export(" matchgroup=logtalkDirTag end=")\." contains=ALL | |
3312 | 116 syn region logtalkDir matchgroup=logtalkDirTag start=":- reexport(" matchgroup=logtalkDirTag end=")\." contains=ALL |
714 | 117 syn region logtalkDir matchgroup=logtalkDirTag start=":- use_module(" matchgroup=logtalkDirTag end=")\." contains=ALL |
118 | |
119 | |
7 | 120 " Logtalk built-in predicates |
121 | |
294 | 122 syn match logtalkBuiltIn "\<\(abolish\|c\(reate\|urrent\)\)_\(object\|protocol\|category\)\ze(" |
7 | 123 |
10 | 124 syn match logtalkBuiltIn "\<\(object\|protocol\|category\)_property\ze(" |
7 | 125 |
3312 | 126 syn match logtalkBuiltIn "\<co\(mplements_object\|nforms_to_protocol\)\ze(" |
1668 | 127 syn match logtalkBuiltIn "\<extends_\(object\|protocol\|category\)\ze(" |
10 | 128 syn match logtalkBuiltIn "\<imp\(orts_category\|lements_protocol\)\ze(" |
1668 | 129 syn match logtalkBuiltIn "\<\(instantiat\|specializ\)es_class\ze(" |
7 | 130 |
10 | 131 syn match logtalkBuiltIn "\<\(abolish\|define\)_events\ze(" |
7 | 132 syn match logtalkBuiltIn "\<current_event\ze(" |
133 | |
14519 | 134 syn match logtalkBuiltIn "\<\(create\|current\|set\)_logtalk_flag\ze(" |
7 | 135 |
14519 | 136 syn match logtalkBuiltIn "\<logtalk_\(compile\|l\(ibrary_path\|oad\|oad_context\)\|make\(_target_action\)\?\)\ze(" |
137 syn match logtalkBuiltIn "\<logtalk_make\>" | |
7 | 138 |
214 | 139 syn match logtalkBuiltIn "\<\(for\|retract\)all\ze(" |
7 | 140 |
1668 | 141 syn match logtalkBuiltIn "\<threaded\(_\(call\|once\|ignore\|exit\|peek\|wait\|notify\)\)\?\ze(" |
14519 | 142 syn match logtalkBuiltIn "\<threaded_engine\(_\(create\|destroy\|self\|next\|next_reified\|yield\|post\|fetch\)\)\?\ze(" |
1668 | 143 |
7 | 144 |
145 " Logtalk built-in methods | |
146 | |
14519 | 147 syn match logtalkBuiltInMethod "\<context\ze(" |
7 | 148 syn match logtalkBuiltInMethod "\<parameter\ze(" |
10 | 149 syn match logtalkBuiltInMethod "\<se\(lf\|nder\)\ze(" |
7 | 150 syn match logtalkBuiltInMethod "\<this\ze(" |
151 | |
152 syn match logtalkBuiltInMethod "\<current_predicate\ze(" | |
153 syn match logtalkBuiltInMethod "\<predicate_property\ze(" | |
154 | |
294 | 155 syn match logtalkBuiltInMethod "\<a\(bolish\|ssert\(a\|z\)\)\ze(" |
7 | 156 syn match logtalkBuiltInMethod "\<clause\ze(" |
294 | 157 syn match logtalkBuiltInMethod "\<retract\(all\)\?\ze(" |
7 | 158 |
10 | 159 syn match logtalkBuiltInMethod "\<\(bag\|set\)of\ze(" |
160 syn match logtalkBuiltInMethod "\<f\(ind\|or\)all\ze(" | |
7 | 161 |
162 syn match logtalkBuiltInMethod "\<before\ze(" | |
163 syn match logtalkBuiltInMethod "\<after\ze(" | |
164 | |
14519 | 165 syn match logtalkBuiltInMethod "\<forward\ze(" |
166 | |
3312 | 167 syn match logtalkBuiltInMethod "\<expand_\(goal\|term\)\ze(" |
1668 | 168 syn match logtalkBuiltInMethod "\<\(goal\|term\)_expansion\ze(" |
7 | 169 syn match logtalkBuiltInMethod "\<phrase\ze(" |
170 | |
171 | |
172 " Mode operators | |
173 | |
174 syn match logtalkOperator "?" | |
175 syn match logtalkOperator "@" | |
176 | |
177 | |
178 " Control constructs | |
179 | |
180 syn match logtalkKeyword "\<true\>" | |
181 syn match logtalkKeyword "\<fail\>" | |
14519 | 182 syn match logtalkKeyword "\<false\>" |
10 | 183 syn match logtalkKeyword "\<ca\(ll\|tch\)\ze(" |
7 | 184 syn match logtalkOperator "!" |
10 | 185 " syn match logtalkOperator "," |
7 | 186 syn match logtalkOperator ";" |
187 syn match logtalkOperator "-->" | |
188 syn match logtalkOperator "->" | |
189 syn match logtalkKeyword "\<throw\ze(" | |
14519 | 190 syn match logtalkKeyword "\<\(instantiation\|system\)_error\>" |
191 syn match logtalkKeyword "\<\(type\|domain\|existence\|permission\|representation\|evaluation\|resource\|syntax\)_error\ze(" | |
7 | 192 |
193 | |
194 " Term unification | |
195 | |
196 syn match logtalkOperator "=" | |
14519 | 197 syn match logtalkKeyword "\<subsumes_term\ze(" |
7 | 198 syn match logtalkKeyword "\<unify_with_occurs_check\ze(" |
199 syn match logtalkOperator "\\=" | |
200 | |
201 | |
202 " Term testing | |
203 | |
204 syn match logtalkKeyword "\<var\ze(" | |
294 | 205 syn match logtalkKeyword "\<atom\(ic\)\?\ze(" |
7 | 206 syn match logtalkKeyword "\<integer\ze(" |
207 syn match logtalkKeyword "\<float\ze(" | |
3312 | 208 syn match logtalkKeyword "\<c\(allable\|ompound\)\ze(" |
10 | 209 syn match logtalkKeyword "\<n\(onvar\|umber\)\ze(" |
3312 | 210 syn match logtalkKeyword "\<ground\ze(" |
14519 | 211 syn match logtalkKeyword "\<acyclic_term\ze(" |
7 | 212 |
213 | |
214 " Term comparison | |
215 | |
3312 | 216 syn match logtalkKeyword "\<compare\ze(" |
7 | 217 syn match logtalkOperator "@=<" |
218 syn match logtalkOperator "==" | |
219 syn match logtalkOperator "\\==" | |
220 syn match logtalkOperator "@<" | |
221 syn match logtalkOperator "@>" | |
222 syn match logtalkOperator "@>=" | |
223 | |
224 | |
225 " Term creation and decomposition | |
226 | |
227 syn match logtalkKeyword "\<functor\ze(" | |
228 syn match logtalkKeyword "\<arg\ze(" | |
229 syn match logtalkOperator "=\.\." | |
230 syn match logtalkKeyword "\<copy_term\ze(" | |
3312 | 231 syn match logtalkKeyword "\<numbervars\ze(" |
14519 | 232 syn match logtalkKeyword "\<term_variables\ze(" |
7 | 233 |
234 | |
14519 | 235 " Predicate aliases |
236 | |
237 syn match logtalkOperator "\<as\>" | |
238 | |
239 | |
240 " Arithmetic evaluation | |
7 | 241 |
214 | 242 syn match logtalkOperator "\<is\>" |
7 | 243 |
244 | |
14519 | 245 " Arithmetic comparison |
7 | 246 |
247 syn match logtalkOperator "=:=" | |
248 syn match logtalkOperator "=\\=" | |
249 syn match logtalkOperator "<" | |
250 syn match logtalkOperator "=<" | |
251 syn match logtalkOperator ">" | |
252 syn match logtalkOperator ">=" | |
253 | |
254 | |
255 " Stream selection and control | |
256 | |
1668 | 257 syn match logtalkKeyword "\<\(curren\|se\)t_\(in\|out\)put\ze(" |
7 | 258 syn match logtalkKeyword "\<open\ze(" |
259 syn match logtalkKeyword "\<close\ze(" | |
260 syn match logtalkKeyword "\<flush_output\ze(" | |
261 syn match logtalkKeyword "\<flush_output\>" | |
262 syn match logtalkKeyword "\<stream_property\ze(" | |
263 syn match logtalkKeyword "\<at_end_of_stream\ze(" | |
264 syn match logtalkKeyword "\<at_end_of_stream\>" | |
265 syn match logtalkKeyword "\<set_stream_position\ze(" | |
266 | |
267 | |
10 | 268 " Character and byte input/output |
7 | 269 |
294 | 270 syn match logtalkKeyword "\<\(get\|p\(eek\|ut\)\)_\(c\(har\|ode\)\|byte\)\ze(" |
7 | 271 syn match logtalkKeyword "\<nl\ze(" |
272 syn match logtalkKeyword "\<nl\>" | |
273 | |
274 | |
275 " Term input/output | |
276 | |
294 | 277 syn match logtalkKeyword "\<read\(_term\)\?\ze(" |
278 syn match logtalkKeyword "\<write\(q\|_\(canonical\|term\)\)\?\ze(" | |
279 syn match logtalkKeyword "\<\(current_\)\?op\ze(" | |
1668 | 280 syn match logtalkKeyword "\<\(current_\)\?char_conversion\ze(" |
7 | 281 |
282 | |
283 " Logic and control | |
284 | |
285 syn match logtalkOperator "\\+" | |
3312 | 286 syn match logtalkKeyword "\<ignore\ze(" |
7 | 287 syn match logtalkKeyword "\<once\ze(" |
288 syn match logtalkKeyword "\<repeat\>" | |
289 | |
290 | |
291 " Atomic term processing | |
292 | |
294 | 293 syn match logtalkKeyword "\<atom_\(length\|c\(hars\|o\(ncat\|des\)\)\)\ze(" |
7 | 294 syn match logtalkKeyword "\<sub_atom\ze(" |
295 syn match logtalkKeyword "\<char_code\ze(" | |
1668 | 296 syn match logtalkKeyword "\<number_c\(har\|ode\)s\ze(" |
7 | 297 |
298 | |
299 " Implementation defined hooks functions | |
300 | |
1668 | 301 syn match logtalkKeyword "\<\(curren\|se\)t_prolog_flag\ze(" |
7 | 302 syn match logtalkKeyword "\<halt\ze(" |
303 syn match logtalkKeyword "\<halt\>" | |
304 | |
305 | |
3312 | 306 " Sorting |
307 | |
308 syn match logtalkKeyword "\<\(key\)\?sort\ze(" | |
309 | |
310 | |
7 | 311 " Evaluable functors |
312 | |
313 syn match logtalkOperator "+" | |
314 syn match logtalkOperator "-" | |
315 syn match logtalkOperator "\*" | |
316 syn match logtalkOperator "//" | |
317 syn match logtalkOperator "/" | |
14519 | 318 syn match logtalkKeyword "\<div\ze(" |
294 | 319 syn match logtalkKeyword "\<r\(ound\|em\)\ze(" |
3312 | 320 syn match logtalkKeyword "\<e\>" |
321 syn match logtalkKeyword "\<pi\>" | |
14519 | 322 syn match logtalkKeyword "\<div\>" |
7 | 323 syn match logtalkKeyword "\<rem\>" |
14519 | 324 syn match logtalkKeyword "\<m\(ax\|in\|od\)\ze(" |
7 | 325 syn match logtalkKeyword "\<mod\>" |
326 syn match logtalkKeyword "\<abs\ze(" | |
327 syn match logtalkKeyword "\<sign\ze(" | |
294 | 328 syn match logtalkKeyword "\<flo\(or\|at\(_\(integer\|fractional\)_part\)\?\)\ze(" |
14519 | 329 syn match logtalkKeyword "\<t\(an\|runcate\)\ze(" |
7 | 330 syn match logtalkKeyword "\<ceiling\ze(" |
331 | |
332 | |
333 " Other arithemtic functors | |
334 | |
335 syn match logtalkOperator "\*\*" | |
10 | 336 syn match logtalkKeyword "\<s\(in\|qrt\)\ze(" |
7 | 337 syn match logtalkKeyword "\<cos\ze(" |
14519 | 338 syn match logtalkKeyword "\<a\(cos\|sin\|tan\|tan2\)\ze(" |
7 | 339 syn match logtalkKeyword "\<exp\ze(" |
340 syn match logtalkKeyword "\<log\ze(" | |
341 | |
342 | |
343 " Bitwise functors | |
344 | |
345 syn match logtalkOperator ">>" | |
346 syn match logtalkOperator "<<" | |
347 syn match logtalkOperator "/\\" | |
348 syn match logtalkOperator "\\/" | |
349 syn match logtalkOperator "\\" | |
14519 | 350 syn match logtalkKeyword "\<xor\ze(" |
7 | 351 |
352 | |
294 | 353 " Logtalk list operator |
354 | |
355 syn match logtalkOperator "|" | |
356 | |
357 | |
3312 | 358 " Logtalk existential quantifier operator |
359 | |
360 syn match logtalkOperator "\^" | |
361 | |
362 | |
363 " Logtalk numbers | |
294 | 364 |
365 syn match logtalkNumber "\<\d\+\>" | |
366 syn match logtalkNumber "\<\d\+\.\d\+\>" | |
367 syn match logtalkNumber "\<\d\+[eE][-+]\=\d\+\>" | |
368 syn match logtalkNumber "\<\d\+\.\d\+[eE][-+]\=\d\+\>" | |
14519 | 369 syn match logtalkNumber "\<0'[\\]\?.\|0''\|0'\"\>" |
294 | 370 syn match logtalkNumber "\<0b[0-1]\+\>" |
308 | 371 syn match logtalkNumber "\<0o\o\+\>" |
294 | 372 syn match logtalkNumber "\<0x\x\+\>" |
373 | |
374 | |
7 | 375 " Logtalk end-of-clause |
376 | |
377 syn match logtalkOperator "\." | |
378 | |
379 | |
380 " Logtalk comments | |
381 | |
308 | 382 syn region logtalkBlockComment start="/\*" end="\*/" fold |
7 | 383 syn match logtalkLineComment "%.*" |
384 | |
3312 | 385 syn cluster logtalkComment contains=logtalkBlockComment,logtalkLineComment |
386 | |
387 | |
388 " Logtalk conditional compilation folding | |
389 | |
390 syn region logtalkIfContainer transparent keepend extend start=":- if(" end=":- endif\." containedin=ALLBUT,@logtalkComment contains=NONE | |
391 syn region logtalkIf transparent fold keepend start=":- if(" end=":- \(else\.\|elif(\)"ms=s-1,me=s-1 contained containedin=logtalkIfContainer nextgroup=logtalkElseIf,logtalkElse contains=TOP | |
392 syn region logtalkElseIf transparent fold keepend start=":- elif(" end=":- \(else\.\|elif(\)"ms=s-1,me=s-1 contained containedin=logtalkIfContainer nextgroup=logtalkElseIf,logtalkElse contains=TOP | |
393 syn region logtalkElse transparent fold keepend start=":- else\." end=":- endif\." contained containedin=logtalkIfContainer contains=TOP | |
394 | |
395 | |
7 | 396 |
308 | 397 " Logtalk entity folding |
398 | |
399 syn region logtalkEntity transparent fold keepend start=":- object(" end=":- end_object\." contains=ALL | |
400 syn region logtalkEntity transparent fold keepend start=":- protocol(" end=":- end_protocol\." contains=ALL | |
401 syn region logtalkEntity transparent fold keepend start=":- category(" end=":- end_category\." contains=ALL | |
402 | |
403 | |
214 | 404 syn sync ccomment logtalkBlockComment maxlines=50 |
7 | 405 |
406 | |
407 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3312
diff
changeset
|
408 " Only when an item doesn't have highlighting yet |
7 | 409 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
410 hi def link logtalkBlockComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
411 hi def link logtalkLineComment Comment |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3312
diff
changeset
|
412 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
413 hi def link logtalkOpenEntityDir Normal |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
414 hi def link logtalkOpenEntityDirTag PreProc |
1668 | 415 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
416 hi def link logtalkIfContainer PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
417 hi def link logtalkIf PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
418 hi def link logtalkElseIf PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
419 hi def link logtalkElse PreProc |
7 | 420 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
421 hi def link logtalkEntity Normal |
3312 | 422 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
423 hi def link logtalkEntityRel Normal |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
424 hi def link logtalkEntityRelTag PreProc |
7 | 425 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
426 hi def link logtalkCloseEntityDir PreProc |
7 | 427 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
428 hi def link logtalkDir Normal |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
429 hi def link logtalkDirTag PreProc |
7 | 430 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
431 hi def link logtalkAtom String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
432 hi def link logtalkString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
433 hi def link logtalkEscapeSequence SpecialChar |
7 | 434 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
435 hi def link logtalkNumber Number |
7 | 436 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
437 hi def link logtalkKeyword Keyword |
7 | 438 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
439 hi def link logtalkBuiltIn Keyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
440 hi def link logtalkBuiltInMethod Keyword |
7 | 441 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
442 hi def link logtalkOperator Operator |
7 | 443 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
444 hi def link logtalkExtCall Normal |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
445 hi def link logtalkExtCallTag Operator |
7 | 446 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
447 hi def link logtalkVariable Identifier |
7 | 448 |
449 | |
450 | |
451 let b:current_syntax = "logtalk" | |
3312 | 452 |
453 let &cpo = s:cpo_save | |
454 unlet s:cpo_save |