annotate runtime/syntax/lite.vim @ 9636:ccbb8e393d80 v7.4.2095

commit https://github.com/vim/vim/commit/61c04493b00f85d0b97436260a9ef9ab82143b78 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 23 15:35:35 2016 +0200 patch 7.4.2095 Problem: Man test fails when run with the GUI. Solution: Adjust for different behavior of GUI. Add assert_inrange().
author Christian Brabandt <cb@256bit.org>
date Sat, 23 Jul 2016 15:45:05 +0200
parents 3fc0f57ecb91
children 43efa4f5a8ea
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 if !exists("main_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 let main_syntax = 'lite'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 if main_syntax == 'lite'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 if exists("lite_sql_query")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 if lite_sql_query == 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn include @liteSql <sfile>:p:h/sql.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 if main_syntax == 'msql'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 if exists("msql_sql_query")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 if msql_sql_query == 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn include @liteSql <sfile>:p:h/sql.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn cluster liteSql remove=sqlString,sqlComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " Internal Variables
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword liteIntVar ERRMSG contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn region liteComment start="/\*" end="\*/" contains=liteTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " Function names
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword liteFunctions echo printf fprintf open close read
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword liteFunctions readln readtok
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword liteFunctions split strseg chop tr sub substr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword liteFunctions test unlink umask chmod mkdir chdir rmdir
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword liteFunctions rename truncate link symlink stat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword liteFunctions sleep system getpid getppid kill
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword liteFunctions time ctime time2unixtime unixtime2year
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword liteFunctions unixtime2year unixtime2month unixtime2day
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword liteFunctions unixtime2hour unixtime2min unixtime2sec
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword liteFunctions strftime
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword liteFunctions getpwnam getpwuid
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword liteFunctions gethostbyname gethostbyaddress
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword liteFunctions urlEncode setContentType includeFile
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword liteFunctions msqlConnect msqlClose msqlSelectDB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword liteFunctions msqlQuery msqlStoreResult msqlFreeResult
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword liteFunctions msqlFetchRow msqlDataSeek msqlListDBs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword liteFunctions msqlListTables msqlInitFieldList msqlListField
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword liteFunctions msqlFieldSeek msqlNumRows msqlEncode
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword liteFunctions exit fatal typeof
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword liteFunctions crypt addHttpHeader
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword liteConditional if else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " Repeat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword liteRepeat while
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 keyword liteStatement break return continue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 " Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match liteOperator "[-+=#*]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn match liteOperator "/[^*]"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match liteOperator "\$"
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 syn match liteRelation "||"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match liteRelation "[!=<>]="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match liteRelation "[<>]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 " Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match liteIdentifier "$\h\w*" contains=liteIntVar,liteOperator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match liteGlobalIdentifier "@\h\w*" contains=liteIntVar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 " Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn keyword liteInclude load
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 " Define
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn keyword liteDefine funct
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 " Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn keyword liteType int uint char real
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 " String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn region liteString keepend matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=liteIdentifier,liteSpecialChar,@liteSql
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 " Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn match liteNumber "-\=\<\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 " Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn match liteFloat "\(-\=\<\d+\|-\=\)\.\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 " SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn match liteSpecialChar "\\[abcfnrtv\\]" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn match liteParentError "[)}\]]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 " Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn keyword liteTodo TODO Todo todo contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 " dont syn #!...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn match liteExec "^#!.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 " Parents
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 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
126
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 syn region liteParent matchgroup=Delimiter start="(" end=")" contains=@liteInside
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 syn region liteParent matchgroup=Delimiter start="{" end="}" contains=@liteInside
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 syn region liteParent matchgroup=Delimiter start="\[" end="\]" contains=@liteInside
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 " sync
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 if main_syntax == 'lite'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 if exists("lite_minlines")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 exec "syn sync minlines=" . lite_minlines
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 syn sync minlines=100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 if version >= 508 || !exists("did_lite_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 let did_lite_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 HiLink liteComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 HiLink liteString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 HiLink liteNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 HiLink liteFloat Float
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 HiLink liteIdentifier Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 HiLink liteGlobalIdentifier Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 HiLink liteIntVar Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 HiLink liteFunctions Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 HiLink liteRepeat Repeat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 HiLink liteConditional Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 HiLink liteStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 HiLink liteType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 HiLink liteInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 HiLink liteDefine Define
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 HiLink liteSpecialChar SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 HiLink liteParentError liteError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 HiLink liteError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 HiLink liteTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 HiLink liteOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 HiLink liteRelation Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 let b:current_syntax = "lite"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 if main_syntax == 'lite'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 " vim: ts=8