annotate runtime/syntax/lite.vim @ 19483:0d3dcb4476ba v8.2.0299

patch 8.2.0299: Vim9: ISN_STORE with argument not tested Commit: https://github.com/vim/vim/commit/8ed04587d3cd53e29be20fde9c36e619ea7da4dc Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 22 19:07:28 2020 +0100 patch 8.2.0299: Vim9: ISN_STORE with argument not tested Problem: Vim9: ISN_STORE with argument not tested. Some cases in tv2bool() not tested. Solution: Add tests. Add test_unknown() and test_void().
author Bram Moolenaar <Bram@vim.org>
date Sat, 22 Feb 2020 19:15:04 +0100
parents 46763b01cd9a
children d46f974fd69e
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: lite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Lutz Eymers <ixtab@polzin.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://www.isp.de/data/lite.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Email: Subject: send syntax_vim.tgz
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Last Change: 2001 Mai 01
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " Options lite_sql_query = 1 for SQL syntax highligthing inside strings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " lite_minlines = x to sync at least x lines backwards
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
11 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
12 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 if !exists("main_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 let main_syntax = 'lite'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 if main_syntax == 'lite'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 if exists("lite_sql_query")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 if lite_sql_query == 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn include @liteSql <sfile>:p:h/sql.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 if main_syntax == 'msql'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 if exists("msql_sql_query")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 if msql_sql_query == 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn include @liteSql <sfile>:p:h/sql.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn cluster liteSql remove=sqlString,sqlComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " Internal Variables
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword liteIntVar ERRMSG contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn region liteComment start="/\*" end="\*/" contains=liteTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " Function names
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword liteFunctions echo printf fprintf open close read
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword liteFunctions readln readtok
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword liteFunctions split strseg chop tr sub substr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword liteFunctions test unlink umask chmod mkdir chdir rmdir
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword liteFunctions rename truncate link symlink stat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword liteFunctions sleep system getpid getppid kill
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword liteFunctions time ctime time2unixtime unixtime2year
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword liteFunctions unixtime2year unixtime2month unixtime2day
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword liteFunctions unixtime2hour unixtime2min unixtime2sec
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword liteFunctions strftime
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword liteFunctions getpwnam getpwuid
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword liteFunctions gethostbyname gethostbyaddress
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword liteFunctions urlEncode setContentType includeFile
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword liteFunctions msqlConnect msqlClose msqlSelectDB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword liteFunctions msqlQuery msqlStoreResult msqlFreeResult
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword liteFunctions msqlFetchRow msqlDataSeek msqlListDBs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword liteFunctions msqlListTables msqlInitFieldList msqlListField
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword liteFunctions msqlFieldSeek msqlNumRows msqlEncode
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword liteFunctions exit fatal typeof
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword liteFunctions crypt addHttpHeader
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword liteConditional if else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " Repeat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword liteRepeat while
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword liteStatement break return continue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match liteOperator "[-+=#*]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn match liteOperator "/[^*]"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn match liteOperator "\$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match liteRelation "&&"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn match liteRelation "||"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match liteRelation "[!=<>]="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match liteRelation "[<>]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 " Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match liteIdentifier "$\h\w*" contains=liteIntVar,liteOperator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match liteGlobalIdentifier "@\h\w*" contains=liteIntVar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 " Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn keyword liteInclude load
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 " Define
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn keyword liteDefine funct
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 " Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn keyword liteType int uint char real
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 " String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn region liteString keepend matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=liteIdentifier,liteSpecialChar,@liteSql
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 " Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn match liteNumber "-\=\<\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 " Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn match liteFloat "\(-\=\<\d+\|-\=\)\.\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 " SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn match liteSpecialChar "\\[abcfnrtv\\]" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn match liteParentError "[)}\]]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 " Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn keyword liteTodo TODO Todo todo contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 " dont syn #!...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn match liteExec "^#!.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 " Parents
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn cluster liteInside contains=liteComment,liteFunctions,liteIdentifier,liteGlobalIdentifier,liteConditional,liteRepeat,liteStatement,liteOperator,liteRelation,liteType,liteString,liteNumber,liteFloat,liteParent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 syn region liteParent matchgroup=Delimiter start="(" end=")" contains=@liteInside
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 syn region liteParent matchgroup=Delimiter start="{" end="}" contains=@liteInside
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syn region liteParent matchgroup=Delimiter start="\[" end="\]" contains=@liteInside
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 " sync
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 if main_syntax == 'lite'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 if exists("lite_minlines")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 exec "syn sync minlines=" . lite_minlines
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 syn sync minlines=100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
138 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
140 hi def link liteComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
141 hi def link liteString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
142 hi def link liteNumber Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
143 hi def link liteFloat Float
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
144 hi def link liteIdentifier Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
145 hi def link liteGlobalIdentifier Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
146 hi def link liteIntVar Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
147 hi def link liteFunctions Function
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
148 hi def link liteRepeat Repeat
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
149 hi def link liteConditional Conditional
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
150 hi def link liteStatement Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
151 hi def link liteType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
152 hi def link liteInclude Include
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
153 hi def link liteDefine Define
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
154 hi def link liteSpecialChar SpecialChar
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
155 hi def link liteParentError liteError
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
156 hi def link liteError Error
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
157 hi def link liteTodo Todo
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
158 hi def link liteOperator Operator
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
159 hi def link liteRelation Operator
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 let b:current_syntax = "lite"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 if main_syntax == 'lite'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 " vim: ts=8