annotate runtime/syntax/spyce.vim @ 4126:2b340e5c5baa v7.3.816

updated for version 7.3.816 Problem: Can't compute a hash. Solution: Add the sha256() function. (Tyru, Hirohito Higashi)
author Bram Moolenaar <bram@vim.org>
date Wed, 13 Feb 2013 17:35:04 +0100
parents 7bc41231fbc7
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: SPYCE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Rimon Barr <rimon AT acm DOT org>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://spyce.sourceforge.net
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
5 " Last Change: 2009 Nov 11
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
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 " we define it here so that included files can test for it
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='spyce'
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 " Read the HTML syntax to start with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 let b:did_indent = 1 " don't perform HTML indentation!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 let html_no_rendering = 1 " do not render <b>,<i>, etc...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 so <sfile>:p:h/html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 runtime! syntax/html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 unlet b:current_syntax
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
28 syntax spell default " added by Bram
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " include python
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn include @Python <sfile>:p:h/python.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn include @Html <sfile>:p:h/html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " spyce definitions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword spyceDirectiveKeyword include compact module import contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword spyceDirectiveArg name names file contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn region spyceDirectiveString start=+"+ end=+"+ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match spyceDirectiveValue "=[\t ]*[^'", \t>][^, \t>]*"hs=s+1 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match spyceBeginErrorS ,\[\[,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match spyceBeginErrorA ,<%,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn cluster spyceBeginError contains=spyceBeginErrorS,spyceBeginErrorA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match spyceEndErrorS ,\]\],
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match spyceEndErrorA ,%>,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn cluster spyceEndError contains=spyceEndErrorS,spyceEndErrorA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match spyceEscBeginS ,\\\[\[,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match spyceEscBeginA ,\\<%,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn cluster spyceEscBegin contains=spyceEscBeginS,spyceEscBeginA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match spyceEscEndS ,\\\]\],
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match spyceEscEndA ,\\%>,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn cluster spyceEscEnd contains=spyceEscEndS,spyceEscEndA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match spyceEscEndCommentS ,--\\\]\],
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match spyceEscEndCommentA ,--\\%>,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn cluster spyceEscEndComment contains=spyceEscEndCommentS,spyceEscEndCommentA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn region spyceStmtS matchgroup=spyceStmtDelim start=,\[\[, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn region spyceStmtA matchgroup=spyceStmtDelim start=,<%, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn region spyceChunkS matchgroup=spyceChunkDelim start=,\[\[\\, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn region spyceChunkA matchgroup=spyceChunkDelim start=,<%\\, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn region spyceEvalS matchgroup=spyceEvalDelim start=,\[\[=, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn region spyceEvalA matchgroup=spyceEvalDelim start=,<%=, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn region spyceDirectiveS matchgroup=spyceDelim start=,\[\[\., end=,\]\], contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn region spyceDirectiveA matchgroup=spyceDelim start=,<%@, end=,%>, contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn region spyceCommentS matchgroup=spyceCommentDelim start=,\[\[--, end=,--\]\],
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn region spyceCommentA matchgroup=spyceCommentDelim start=,<%--, end=,--%>,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn region spyceLambdaS matchgroup=spyceLambdaDelim start=,\[\[spy!\?, end=,\]\], contains=@Html,@spyce extend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn region spyceLambdaA matchgroup=spyceLambdaDelim start=,<%spy!\?, end=,%>, contains=@Html,@spyce extend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn cluster spyce contains=spyceStmtS,spyceStmtA,spyceChunkS,spyceChunkA,spyceEvalS,spyceEvalA,spyceCommentS,spyceCommentA,spyceDirectiveS,spyceDirectiveA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn cluster htmlPreproc contains=@spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 hi link spyceDirectiveKeyword Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 hi link spyceDirectiveArg Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 hi link spyceDirectiveString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 hi link spyceDirectiveValue String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 hi link spyceDelim Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 hi link spyceStmtDelim spyceDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 hi link spyceChunkDelim spyceDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 hi link spyceEvalDelim spyceDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 hi link spyceLambdaDelim spyceDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 hi link spyceCommentDelim Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 hi link spyceBeginErrorS Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 hi link spyceBeginErrorA Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 hi link spyceEndErrorS Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 hi link spyceEndErrorA Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 hi link spyceStmtS spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 hi link spyceStmtA spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 hi link spyceChunkS spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 hi link spyceChunkA spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 hi link spyceEvalS spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 hi link spyceEvalA spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 hi link spyceDirectiveS spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 hi link spyceDirectiveA spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 hi link spyceCommentS Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 hi link spyceCommentA Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 hi link spyceLambdaS Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 hi link spyceLambdaA Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 hi link spyce Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 let b:current_syntax = "spyce"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 if main_syntax == 'spyce'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111