comparison runtime/syntax/scheme.vim @ 36:125e80798a85 v7.0021

updated for version 7.0021
author vimboss
date Thu, 09 Dec 2004 21:34:53 +0000
parents 404aac550f35
children b9740fb41986
comparison
equal deleted inserted replaced
35:8f3a526c2fe1 36:125e80798a85
1 " Vim syntax file 1 " Vim syntax file
2 " Language: Scheme (R5RS) 2 " Language: Scheme (R5RS)
3 " Last Change: July 14, 2004 3 " Last Change: Nov 28, 2004
4 " Maintainer: Sergey Khorev <iamphet@nm.ru> 4 " Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
5 " Original author: Dirk van Deun <dirk@igwe.vub.ac.be> 5 " Original author: Dirk van Deun <dirk@igwe.vub.ac.be>
6 6
7 " This script incorrectly recognizes some junk input as numerals: 7 " This script incorrectly recognizes some junk input as numerals:
8 " parsing the complete system of Scheme numerals using the pattern 8 " parsing the complete system of Scheme numerals using the pattern
9 " language is practically impossible: I did a lax approximation. 9 " language is practically impossible: I did a lax approximation.
141 141
142 syn region schemeStruc matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALL 142 syn region schemeStruc matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALL
143 syn region schemeStruc matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALL 143 syn region schemeStruc matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALL
144 144
145 " Simple literals: 145 " Simple literals:
146 syn region schemeString start=+"+ skip=+\\[\\"]+ end=+"+ 146 syn region schemeString start=+\%(\\\)\@<!"+ skip=+\\[\\"]+ end=+"+
147 147
148 " Comments: 148 " Comments:
149 149
150 syn match schemeComment ";.*$" 150 syn match schemeComment ";.*$"
151 151
170 syn match schemeError oneline !#\\space[^ \t\[\]()";]\+! 170 syn match schemeError oneline !#\\space[^ \t\[\]()";]\+!
171 syn match schemeChar oneline "#\\newline" 171 syn match schemeChar oneline "#\\newline"
172 syn match schemeError oneline !#\\newline[^ \t\[\]()";]\+! 172 syn match schemeError oneline !#\\newline[^ \t\[\]()";]\+!
173 173
174 if exists("b:is_mzscheme") || exists("is_mzscheme") 174 if exists("b:is_mzscheme") || exists("is_mzscheme")
175 " MzScheme extensions added by Sergey Khorev 175 " MzScheme extensions
176 " multiline comment 176 " multiline comment
177 syntax region schemeMultilineComment start=/#|/ end=/|#/ 177 syn region schemeComment start="#|" end="|#"
178
178 " #%xxx are the special MzScheme identifiers 179 " #%xxx are the special MzScheme identifiers
179 syn match schemeOther oneline "#%[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" 180 syn match schemeOther oneline "#%[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
180 " anything limited by |'s is identifier 181 " anything limited by |'s is identifier
181 syn match schemeOther oneline "|[^|]\+|" 182 syn match schemeOther oneline "|[^|]\+|"
182 183
183 syn match schemeChar oneline "#\\return" 184 syn match schemeChar oneline "#\\\%(return\|tab\)"
184 185
185 " Modules require stmt 186 " Modules require stmt
186 syn keyword schemeExtSyntax module require dynamic-require lib prefix all-except prefix-all-except rename 187 syn keyword schemeExtSyntax module require dynamic-require lib prefix all-except prefix-all-except rename
187 " modules provide stmt 188 " modules provide stmt
188 syn keyword schemeExtSyntax provide struct all-from all-from-except all-defined all-defined-except 189 syn keyword schemeExtSyntax provide struct all-from all-from-except all-defined all-defined-except
228 syn region schemeQuoted matchgroup=Delimiter start="#['`](" matchgroup=Delimiter end=")" contains=ALL 229 syn region schemeQuoted matchgroup=Delimiter start="#['`](" matchgroup=Delimiter end=")" contains=ALL
229 endif 230 endif
230 231
231 232
232 if exists("b:is_chicken") || exists("is_chicken") 233 if exists("b:is_chicken") || exists("is_chicken")
234 " multiline comment
235 syntax region schemeMultilineComment start=/#|/ end=/|#/ contains=schemeMultilineComment
236
233 syn match schemeOther oneline "##[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" 237 syn match schemeOther oneline "##[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
234 syn match schemeExtSyntax oneline "#:[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" 238 syn match schemeExtSyntax oneline "#:[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
235 239
236 syn keyword schemeExtSyntax unit uses declare hide foreign-declare foreign-parse foreign-parse/spec 240 syn keyword schemeExtSyntax unit uses declare hide foreign-declare foreign-parse foreign-parse/spec
237 syn keyword schemeExtSyntax foreign-lambda foreign-lambda* 241 syn keyword schemeExtSyntax foreign-lambda foreign-lambda* define-external define-macro load-library
238 syn keyword schemeExtSyntax let-optionals let-optionals* define-foreign-variable 242 syn keyword schemeExtSyntax let-values let*-values letrec-values ->string require-extension
243 syn keyword schemeExtSyntax let-optionals let-optionals* define-foreign-variable define-record
244 syn keyword schemeExtSyntax pointer tag-pointer tagged-pointer? define-foreign-type
245 syn keyword schemeExtSyntax require require-for-syntax cond-expand and-let* receive argc+argv
246 syn keyword schemeExtSyntax fixnum? fx= fx> fx< fx>= fx<= fxmin fxmax
239 syn keyword schemeExtFunc ##core#inline ##sys#error ##sys#update-errno 247 syn keyword schemeExtFunc ##core#inline ##sys#error ##sys#update-errno
240 248
241 " here-string 249 " here-string
242 syn region schemeString start=+#<<\s*\z(.*\)+ end=+^\z1$+ 250 syn region schemeString start=+#<<\s*\z(.*\)+ end=+^\z1$+
243 251