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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: LambdaProlog (Teyjus)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Filenames: *.mod *.sig
659
d6a69271cb9a updated for version 7.0194
vimboss
parents: 20
diff changeset
4 " Maintainer: Markus Mottl <markus.mottl@gmail.com>
d6a69271cb9a updated for version 7.0194
vimboss
parents: 20
diff changeset
5 " URL: http://www.ocaml.info/vim/syntax/lprolog.vim
d6a69271cb9a updated for version 7.0194
vimboss
parents: 20
diff changeset
6 " Last Change: 2006 Feb 05
20
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 7
diff changeset
7 " 2001 Apr 26 - Upgraded for new Vim version
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 7
diff changeset
8 " 2000 Jun 5 - Initial release
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " Lambda Prolog is case sensitive.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn match lprologBrackErr "\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match lprologParenErr ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn cluster lprologContained contains=lprologTodo,lprologModuleName,lprologTypeNames,lprologTypeName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Enclosing delimiters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn region lprologEncl transparent matchgroup=lprologKeyword start="(" matchgroup=lprologKeyword end=")" contains=ALLBUT,@lprologContained,lprologParenErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn region lprologEncl transparent matchgroup=lprologKeyword start="\[" matchgroup=lprologKeyword end="\]" contains=ALLBUT,@lprologContained,lprologBrackErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " General identifiers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match lprologIdentifier "\<\(\w\|[-+*/\\^<>=`'~?@#$&!_]\)*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match lprologVariable "\<\(\u\|_\)\(\w\|[-+*/\\^<>=`'~?@#$&!]\)*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match lprologOperator "/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn region lprologComment start="/\*" end="\*/" contains=lprologComment,lprologTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn region lprologComment start="%" end="$" contains=lprologTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword lprologTodo contained TODO FIXME XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match lprologInteger "\<\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match lprologReal "\<\(\d\+\)\=\.\d+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn region lprologString start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " Clause definitions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn region lprologClause start="^\w\+" end=":-\|\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " Modules
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn region lprologModule matchgroup=lprologKeyword start="^\<module\>" matchgroup=lprologKeyword end="\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " Types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match lprologKeyword "^\<type\>" skipwhite nextgroup=lprologTypeNames
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn region lprologTypeNames matchgroup=lprologBraceErr start="\<\w\+\>" matchgroup=lprologKeyword end="\." contained contains=lprologTypeName,lprologOperator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match lprologTypeName "\<\w\+\>" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " Keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword lprologKeyword end import accumulate accum_sig
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword lprologKeyword local localkind closed sig
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword lprologKeyword kind exportdef useonly
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword lprologKeyword infixl infixr infix prefix
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword lprologKeyword prefixr postfix postfixl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword lprologSpecial pi sigma is true fail halt stop not
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " Operators
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match lprologSpecial ":-"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match lprologSpecial "->"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match lprologSpecial "=>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match lprologSpecial "\\"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match lprologSpecial "!"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match lprologSpecial ","
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match lprologSpecial ";"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match lprologSpecial "&"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match lprologOperator "+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match lprologOperator "-"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match lprologOperator "*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn match lprologOperator "\~"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn match lprologOperator "\^"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn match lprologOperator "<"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn match lprologOperator ">"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match lprologOperator "=<"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn match lprologOperator ">="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn match lprologOperator "::"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match lprologOperator "="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match lprologOperator "\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match lprologOperator ":"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn match lprologOperator "|"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match lprologCommentErr "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn sync minlines=50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn sync maxlines=500
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 let b:current_syntax = "lprolog"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 " vim: ts=8