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