annotate runtime/syntax/sl.vim @ 34633:45d13860879a v9.1.0203

patch 9.1.0203: build-error on GNU/Hurd Commit: https://github.com/vim/vim/commit/4a95377593d06599a88670fcb6b49041a4b47abe Author: James McCoy <jamessan@jamessan.com> Date: Mon Mar 25 16:22:23 2024 +0100 patch 9.1.0203: build-error on GNU/Hurd Problem: build-error on GNU HURD Solution: Define _XOPEN_SOURCE like for Android and Cygwin (James McCoy) strptime() requires _XOPEN_SOURCE to be defined for its declaration to be visible. This is already done for non-Android Linux and Cygwin, but also needs to be exposed for GNU/Hurd. closes: #14285 Signed-off-by: James McCoy <jamessan@jamessan.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Mon, 25 Mar 2024 16:30:12 +0100
parents 46763b01cd9a
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: Renderman shader language
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Dan Piponi <dan@tanelorn.demon.co.uk>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2001 May 09
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
6 " 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
7 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " A bunch of useful Renderman keywords including special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " RenderMan control structures
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 syn keyword slStatement break return continue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syn keyword slConditional if else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn keyword slRepeat while for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn keyword slRepeat illuminance illuminate solar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword slTodo contained TODO FIXME XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " String and Character constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " Highlight special characters (those which have a backslash) differently
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match slSpecial contained "\\[0-9][0-9][0-9]\|\\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn region slString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=slSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match slCharacter "'[^\\]'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match slSpecialCharacter "'\\.'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match slSpecialCharacter "'\\[0-9][0-9]'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match slSpecialCharacter "'\\[0-9][0-9][0-9]'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 "catch errors caused by wrong parenthesis
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn region slParen transparent start='(' end=')' contains=ALLBUT,slParenError,slIncluded,slSpecial,slTodo,slUserLabel
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match slParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match slInParen contained "[{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 "integer number, or floating point number without a dot and with "f".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match slNumber "\<[0-9]\+\(u\=l\=\|lu\|f\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 "floating point number, with dot, optional exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match slFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 "floating point number, starting with a dot, optional exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match slFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 "floating point number, without dot, with exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match slFloat "\<[0-9]\+e[-+]\=[0-9]\+[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 "hex number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match slNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 "syn match slIdentifier "\<[a-z_][a-z0-9_]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 if exists("sl_comment_strings")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " A comment can contain slString, slCharacter and slNumber.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " But a "*/" inside a slString in a slComment DOES end the comment! So we
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " need to use a special type of slString: slCommentString, which also ends on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 " "*/", and sees a "*" at the start of the line as comment again.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " Unfortunately this doesn't very well work for // type of comments :-(
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syntax match slCommentSkip contained "^\s*\*\($\|\s\+\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syntax region slCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=slSpecial,slCommentSkip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syntax region slComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=slSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syntax region slComment start="/\*" end="\*/" contains=slTodo,slCommentString,slCharacter,slNumber
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn region slComment start="/\*" end="\*/" contains=slTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syntax match slCommentError "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword slOperator sizeof
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword slType float point color string vector normal matrix void
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword slStorageClass varying uniform extern
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword slStorageClass light surface volume displacement transformation imager
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword slVariable Cs Os P dPdu dPdv N Ng u v du dv s t
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword slVariable L Cl Ol E I ncomps time Ci Oi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword slVariable Ps alpha
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword slVariable dtime dPdtime
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn sync ccomment slComment minlines=10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
75 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
77 hi def link slLabel Label
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
78 hi def link slUserLabel Label
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
79 hi def link slConditional Conditional
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
80 hi def link slRepeat Repeat
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
81 hi def link slCharacter Character
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
82 hi def link slSpecialCharacter slSpecial
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
83 hi def link slNumber Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
84 hi def link slFloat Float
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
85 hi def link slParenError slError
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
86 hi def link slInParen slError
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
87 hi def link slCommentError slError
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
88 hi def link slOperator Operator
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
89 hi def link slStorageClass StorageClass
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
90 hi def link slError Error
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
91 hi def link slStatement Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
92 hi def link slType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
93 hi def link slCommentError slError
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
94 hi def link slCommentString slString
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
95 hi def link slComment2String slString
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
96 hi def link slCommentSkip slComment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
97 hi def link slString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
98 hi def link slComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
99 hi def link slSpecial SpecialChar
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
100 hi def link slTodo Todo
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
101 hi def link slVariable Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
102 "hi def link slIdentifier Identifier
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 let b:current_syntax = "sl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 " vim: ts=8