Mercurial > vim
annotate runtime/syntax/lprolog.vim @ 19568:c0749ad6c699 v8.2.0341
patch 8.2.0341: using ":for" in Vim9 script gives an error
Commit: https://github.com/vim/vim/commit/41fe061753923986e6676424132960d970bb2a76
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 1 16:22:40 2020 +0100
patch 8.2.0341: using ":for" in Vim9 script gives an error
Problem: Using ":for" in Vim9 script gives an error.
Solution: Pass the LET_NO_COMMAND flag. (closes https://github.com/vim/vim/issues/5715)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 01 Mar 2020 16:30:03 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: LambdaProlog (Teyjus) | |
3 " Filenames: *.mod *.sig | |
659 | 4 " Maintainer: Markus Mottl <markus.mottl@gmail.com> |
5 " URL: http://www.ocaml.info/vim/syntax/lprolog.vim | |
6 " Last Change: 2006 Feb 05 | |
20 | 7 " 2001 Apr 26 - Upgraded for new Vim version |
8 " 2000 Jun 5 - Initial release | |
7 | 9 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
659
diff
changeset
|
10 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
659
diff
changeset
|
11 if exists("b:current_syntax") |
7 | 12 finish |
13 endif | |
14 | |
15 " Lambda Prolog is case sensitive. | |
16 syn case match | |
17 | |
18 syn match lprologBrackErr "\]" | |
19 syn match lprologParenErr ")" | |
20 | |
21 syn cluster lprologContained contains=lprologTodo,lprologModuleName,lprologTypeNames,lprologTypeName | |
22 | |
23 " Enclosing delimiters | |
24 syn region lprologEncl transparent matchgroup=lprologKeyword start="(" matchgroup=lprologKeyword end=")" contains=ALLBUT,@lprologContained,lprologParenErr | |
25 syn region lprologEncl transparent matchgroup=lprologKeyword start="\[" matchgroup=lprologKeyword end="\]" contains=ALLBUT,@lprologContained,lprologBrackErr | |
26 | |
27 " General identifiers | |
28 syn match lprologIdentifier "\<\(\w\|[-+*/\\^<>=`'~?@#$&!_]\)*\>" | |
29 syn match lprologVariable "\<\(\u\|_\)\(\w\|[-+*/\\^<>=`'~?@#$&!]\)*\>" | |
30 | |
31 syn match lprologOperator "/" | |
32 | |
33 " Comments | |
34 syn region lprologComment start="/\*" end="\*/" contains=lprologComment,lprologTodo | |
35 syn region lprologComment start="%" end="$" contains=lprologTodo | |
36 syn keyword lprologTodo contained TODO FIXME XXX | |
37 | |
38 syn match lprologInteger "\<\d\+\>" | |
39 syn match lprologReal "\<\(\d\+\)\=\.\d+\>" | |
40 syn region lprologString start=+"+ skip=+\\\\\|\\"+ end=+"+ | |
41 | |
42 " Clause definitions | |
43 syn region lprologClause start="^\w\+" end=":-\|\." | |
44 | |
45 " Modules | |
46 syn region lprologModule matchgroup=lprologKeyword start="^\<module\>" matchgroup=lprologKeyword end="\." | |
47 | |
48 " Types | |
49 syn match lprologKeyword "^\<type\>" skipwhite nextgroup=lprologTypeNames | |
50 syn region lprologTypeNames matchgroup=lprologBraceErr start="\<\w\+\>" matchgroup=lprologKeyword end="\." contained contains=lprologTypeName,lprologOperator | |
51 syn match lprologTypeName "\<\w\+\>" contained | |
52 | |
53 " Keywords | |
54 syn keyword lprologKeyword end import accumulate accum_sig | |
55 syn keyword lprologKeyword local localkind closed sig | |
56 syn keyword lprologKeyword kind exportdef useonly | |
57 syn keyword lprologKeyword infixl infixr infix prefix | |
58 syn keyword lprologKeyword prefixr postfix postfixl | |
59 | |
60 syn keyword lprologSpecial pi sigma is true fail halt stop not | |
61 | |
62 " Operators | |
63 syn match lprologSpecial ":-" | |
64 syn match lprologSpecial "->" | |
65 syn match lprologSpecial "=>" | |
66 syn match lprologSpecial "\\" | |
67 syn match lprologSpecial "!" | |
68 | |
69 syn match lprologSpecial "," | |
70 syn match lprologSpecial ";" | |
71 syn match lprologSpecial "&" | |
72 | |
73 syn match lprologOperator "+" | |
74 syn match lprologOperator "-" | |
75 syn match lprologOperator "*" | |
76 syn match lprologOperator "\~" | |
77 syn match lprologOperator "\^" | |
78 syn match lprologOperator "<" | |
79 syn match lprologOperator ">" | |
80 syn match lprologOperator "=<" | |
81 syn match lprologOperator ">=" | |
82 syn match lprologOperator "::" | |
83 syn match lprologOperator "=" | |
84 | |
85 syn match lprologOperator "\." | |
86 syn match lprologOperator ":" | |
87 syn match lprologOperator "|" | |
88 | |
89 syn match lprologCommentErr "\*/" | |
90 | |
91 syn sync minlines=50 | |
92 syn sync maxlines=500 | |
93 | |
94 | |
95 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
659
diff
changeset
|
96 " Only when an item doesn't have highlighting yet |
7 | 97 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
98 hi def link lprologComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
99 hi def link lprologTodo Todo |
7 | 100 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
101 hi def link lprologKeyword Keyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
102 hi def link lprologSpecial Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
103 hi def link lprologOperator Operator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
104 hi def link lprologIdentifier Normal |
7 | 105 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
106 hi def link lprologInteger Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
107 hi def link lprologReal Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
108 hi def link lprologString String |
7 | 109 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
110 hi def link lprologCommentErr Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
111 hi def link lprologBrackErr Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
112 hi def link lprologParenErr Error |
7 | 113 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
114 hi def link lprologModuleName Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
115 hi def link lprologTypeName Identifier |
7 | 116 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
117 hi def link lprologVariable Keyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
118 hi def link lprologAtom Normal |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
119 hi def link lprologClause Type |
7 | 120 |
121 | |
122 let b:current_syntax = "lprolog" | |
123 | |
124 " vim: ts=8 |