annotate runtime/syntax/spyce.vim @ 32130:ec0d5bd9083c v9.0.1396

patch 9.0.1396: sort(list, 'N') does not work in Vim9 script context Commit: https://github.com/vim/vim/commit/be19d78c3d44221cbc38fbb5bac19302345c1def Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 9 22:06:49 2023 +0000 patch 9.0.1396: sort(list, 'N') does not work in Vim9 script context Problem: sort(list, 'N') does not work in Vim9 script context. Solution: Convert string to number without giving an error. (closes https://github.com/vim/vim/issues/12061)
author Bram Moolenaar <Bram@vim.org>
date Thu, 09 Mar 2023 23:15:04 +0100
parents 43efa4f5a8ea
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: 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
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
7 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
8 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " we define it here so that included files can test for it
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 if !exists("main_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 let main_syntax='spyce'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " Read the HTML syntax to start with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 let b:did_indent = 1 " don't perform HTML indentation!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 let html_no_rendering = 1 " do not render <b>,<i>, etc...
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
20 runtime! syntax/html.vim
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
21 unlet b:current_syntax
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
22 syntax spell default " added by Bram
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 " include python
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn include @Python <sfile>:p:h/python.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn include @Html <sfile>:p:h/html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " spyce definitions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword spyceDirectiveKeyword include compact module import contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword spyceDirectiveArg name names file contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn region spyceDirectiveString start=+"+ end=+"+ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match spyceDirectiveValue "=[\t ]*[^'", \t>][^, \t>]*"hs=s+1 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match spyceBeginErrorS ,\[\[,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match spyceBeginErrorA ,<%,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn cluster spyceBeginError contains=spyceBeginErrorS,spyceBeginErrorA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match spyceEndErrorS ,\]\],
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match spyceEndErrorA ,%>,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn cluster spyceEndError contains=spyceEndErrorS,spyceEndErrorA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match spyceEscBeginS ,\\\[\[,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match spyceEscBeginA ,\\<%,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn cluster spyceEscBegin contains=spyceEscBeginS,spyceEscBeginA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match spyceEscEndS ,\\\]\],
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match spyceEscEndA ,\\%>,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn cluster spyceEscEnd contains=spyceEscEndS,spyceEscEndA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match spyceEscEndCommentS ,--\\\]\],
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match spyceEscEndCommentA ,--\\%>,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn cluster spyceEscEndComment contains=spyceEscEndCommentS,spyceEscEndCommentA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn region spyceStmtS matchgroup=spyceStmtDelim start=,\[\[, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn region spyceStmtA matchgroup=spyceStmtDelim start=,<%, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn region spyceChunkS matchgroup=spyceChunkDelim start=,\[\[\\, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn region spyceChunkA matchgroup=spyceChunkDelim start=,<%\\, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn region spyceEvalS matchgroup=spyceEvalDelim start=,\[\[=, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn region spyceEvalA matchgroup=spyceEvalDelim start=,<%=, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn region spyceDirectiveS matchgroup=spyceDelim start=,\[\[\., end=,\]\], contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn region spyceDirectiveA matchgroup=spyceDelim start=,<%@, end=,%>, contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn region spyceCommentS matchgroup=spyceCommentDelim start=,\[\[--, end=,--\]\],
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn region spyceCommentA matchgroup=spyceCommentDelim start=,<%--, end=,--%>,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn region spyceLambdaS matchgroup=spyceLambdaDelim start=,\[\[spy!\?, end=,\]\], contains=@Html,@spyce extend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn region spyceLambdaA matchgroup=spyceLambdaDelim start=,<%spy!\?, end=,%>, contains=@Html,@spyce extend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn cluster spyce contains=spyceStmtS,spyceStmtA,spyceChunkS,spyceChunkA,spyceEvalS,spyceEvalA,spyceCommentS,spyceCommentA,spyceDirectiveS,spyceDirectiveA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn cluster htmlPreproc contains=@spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 hi link spyceDirectiveKeyword Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 hi link spyceDirectiveArg Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 hi link spyceDirectiveString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 hi link spyceDirectiveValue String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 hi link spyceDelim Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 hi link spyceStmtDelim spyceDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 hi link spyceChunkDelim spyceDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 hi link spyceEvalDelim spyceDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 hi link spyceLambdaDelim spyceDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 hi link spyceCommentDelim Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 hi link spyceBeginErrorS Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 hi link spyceBeginErrorA Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 hi link spyceEndErrorS Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 hi link spyceEndErrorA Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 hi link spyceStmtS spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 hi link spyceStmtA spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 hi link spyceChunkS spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 hi link spyceChunkA spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 hi link spyceEvalS spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 hi link spyceEvalA spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 hi link spyceDirectiveS spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 hi link spyceDirectiveA spyce
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 hi link spyceCommentS Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 hi link spyceCommentA Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 hi link spyceLambdaS Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 hi link spyceLambdaA Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 hi link spyce Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 let b:current_syntax = "spyce"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 if main_syntax == 'spyce'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 unlet main_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104