Mercurial > vim
annotate runtime/syntax/radiance.vim @ 28313:b418e073b42f v8.2.4682
patch 8.2.4682: Vim9: can use :unlockvar for const variable
Commit: https://github.com/vim/vim/commit/7a411a306f90339d8686e42ac16e1ae4fc7533c5
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Apr 4 14:58:06 2022 +0100
patch 8.2.4682: Vim9: can use :unlockvar for const variable
Problem: Vim9: can use :unlockvar for const variable. (Ernie Rael)
Solution: Check whether the variable is a const.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 04 Apr 2022 16:00:03 +0200 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Radiance Scene Description | |
3 " Maintainer: Georg Mischler <schorsch@schorsch.com> | |
4 " Last change: 26. April. 2001 | |
5 | |
6 " Radiance is a lighting simulation software package written | |
7 " by Gregory Ward-Larson ("the computer artist formerly known | |
8 " as Greg Ward"), then at LBNL. | |
9 " | |
10 " http://radsite.lbl.gov/radiance/HOME.html | |
11 " | |
12 " Of course, there is also information available about it | |
13 " from http://www.schorsch.com/ | |
14 | |
15 | |
16 " We take a minimalist approach here, highlighting just the | |
17 " essential properties of each object, its type and ID, as well as | |
18 " comments, external command names and the null-modifier "void". | |
19 | |
20 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
21 " 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
|
22 if exists("b:current_syntax") |
7 | 23 finish |
24 endif | |
25 | |
26 " all printing characters except '#' and '!' are valid in names. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
27 setlocal iskeyword=\",$-~ |
7 | 28 |
29 " The null-modifier | |
30 syn keyword radianceKeyword void | |
31 | |
32 " The different kinds of scene description object types | |
33 " Reference types | |
34 syn keyword radianceExtraType contained alias instance | |
35 " Surface types | |
36 syn keyword radianceSurfType contained ring polygon sphere bubble | |
37 syn keyword radianceSurfType contained cone cup cylinder tube source | |
38 " Emitting material types | |
39 syn keyword radianceLightType contained light glow illum spotlight | |
40 " Material types | |
41 syn keyword radianceMatType contained mirror mist prism1 prism2 | |
42 syn keyword radianceMatType contained metal plastic trans | |
43 syn keyword radianceMatType contained metal2 plastic2 trans2 | |
44 syn keyword radianceMatType contained metfunc plasfunc transfunc | |
45 syn keyword radianceMatType contained metdata plasdata transdata | |
46 syn keyword radianceMatType contained dielectric interface glass | |
47 syn keyword radianceMatType contained BRTDfunc antimatter | |
48 " Pattern modifier types | |
49 syn keyword radiancePatType contained colorfunc brightfunc | |
50 syn keyword radiancePatType contained colordata colorpict brightdata | |
51 syn keyword radiancePatType contained colortext brighttext | |
52 " Texture modifier types | |
53 syn keyword radianceTexType contained texfunc texdata | |
54 " Mixture types | |
55 syn keyword radianceMixType contained mixfunc mixdata mixpict mixtext | |
56 | |
57 | |
58 " Each type name is followed by an ID. | |
59 " This doesn't work correctly if the id is one of the type names of the | |
60 " same class (which is legal for radiance), in which case the id will get | |
61 " type color as well, and the int count (or alias reference) gets id color. | |
62 | |
63 syn region radianceID start="\<alias\>" end="\<\k*\>" contains=radianceExtraType | |
64 syn region radianceID start="\<instance\>" end="\<\k*\>" contains=radianceExtraType | |
65 | |
66 syn region radianceID start="\<source\>" end="\<\k*\>" contains=radianceSurfType | |
67 syn region radianceID start="\<ring\>" end="\<\k*\>" contains=radianceSurfType | |
68 syn region radianceID start="\<polygon\>" end="\<\k*\>" contains=radianceSurfType | |
69 syn region radianceID start="\<sphere\>" end="\<\k*\>" contains=radianceSurfType | |
70 syn region radianceID start="\<bubble\>" end="\<\k*\>" contains=radianceSurfType | |
71 syn region radianceID start="\<cone\>" end="\<\k*\>" contains=radianceSurfType | |
72 syn region radianceID start="\<cup\>" end="\<\k*\>" contains=radianceSurfType | |
73 syn region radianceID start="\<cylinder\>" end="\<\k*\>" contains=radianceSurfType | |
74 syn region radianceID start="\<tube\>" end="\<\k*\>" contains=radianceSurfType | |
75 | |
76 syn region radianceID start="\<light\>" end="\<\k*\>" contains=radianceLightType | |
77 syn region radianceID start="\<glow\>" end="\<\k*\>" contains=radianceLightType | |
78 syn region radianceID start="\<illum\>" end="\<\k*\>" contains=radianceLightType | |
79 syn region radianceID start="\<spotlight\>" end="\<\k*\>" contains=radianceLightType | |
80 | |
81 syn region radianceID start="\<mirror\>" end="\<\k*\>" contains=radianceMatType | |
82 syn region radianceID start="\<mist\>" end="\<\k*\>" contains=radianceMatType | |
83 syn region radianceID start="\<prism1\>" end="\<\k*\>" contains=radianceMatType | |
84 syn region radianceID start="\<prism2\>" end="\<\k*\>" contains=radianceMatType | |
85 syn region radianceID start="\<metal\>" end="\<\k*\>" contains=radianceMatType | |
86 syn region radianceID start="\<plastic\>" end="\<\k*\>" contains=radianceMatType | |
87 syn region radianceID start="\<trans\>" end="\<\k*\>" contains=radianceMatType | |
88 syn region radianceID start="\<metal2\>" end="\<\k*\>" contains=radianceMatType | |
89 syn region radianceID start="\<plastic2\>" end="\<\k*\>" contains=radianceMatType | |
90 syn region radianceID start="\<trans2\>" end="\<\k*\>" contains=radianceMatType | |
91 syn region radianceID start="\<metfunc\>" end="\<\k*\>" contains=radianceMatType | |
92 syn region radianceID start="\<plasfunc\>" end="\<\k*\>" contains=radianceMatType | |
93 syn region radianceID start="\<transfunc\>" end="\<\k*\>" contains=radianceMatType | |
94 syn region radianceID start="\<metdata\>" end="\<\k*\>" contains=radianceMatType | |
95 syn region radianceID start="\<plasdata\>" end="\<\k*\>" contains=radianceMatType | |
96 syn region radianceID start="\<transdata\>" end="\<\k*\>" contains=radianceMatType | |
97 syn region radianceID start="\<dielectric\>" end="\<\k*\>" contains=radianceMatType | |
98 syn region radianceID start="\<interface\>" end="\<\k*\>" contains=radianceMatType | |
99 syn region radianceID start="\<glass\>" end="\<\k*\>" contains=radianceMatType | |
100 syn region radianceID start="\<BRTDfunc\>" end="\<\k*\>" contains=radianceMatType | |
101 syn region radianceID start="\<antimatter\>" end="\<\k*\>" contains=radianceMatType | |
102 | |
103 syn region radianceID start="\<colorfunc\>" end="\<\k*\>" contains=radiancePatType | |
104 syn region radianceID start="\<brightfunc\>" end="\<\k*\>" contains=radiancePatType | |
105 syn region radianceID start="\<colordata\>" end="\<\k*\>" contains=radiancePatType | |
106 syn region radianceID start="\<brightdata\>" end="\<\k*\>" contains=radiancePatType | |
107 syn region radianceID start="\<colorpict\>" end="\<\k*\>" contains=radiancePatType | |
108 syn region radianceID start="\<colortext\>" end="\<\k*\>" contains=radiancePatType | |
109 syn region radianceID start="\<brighttext\>" end="\<\k*\>" contains=radiancePatType | |
110 | |
111 syn region radianceID start="\<texfunc\>" end="\<\k*\>" contains=radianceTexType | |
112 syn region radianceID start="\<texdata\>" end="\<\k*\>" contains=radianceTexType | |
113 | |
114 syn region radianceID start="\<mixfunc\>" end="\<\k*\>" contains=radianceMixType | |
115 syn region radianceID start="\<mixdata\>" end="\<\k*\>" contains=radianceMixType | |
116 syn region radianceID start="\<mixtext\>" end="\<\k*\>" contains=radianceMixType | |
117 | |
118 " external commands (generators, xform et al.) | |
119 syn match radianceCommand "^\s*!\s*[^\s]\+\>" | |
120 | |
121 " The usual suspects | |
122 syn keyword radianceTodo contained TODO XXX | |
123 syn match radianceComment "#.*$" contains=radianceTodo | |
124 | |
125 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
126 " Only when an item doesn't have highlighting yet |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
127 hi def link radianceKeyword Keyword |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
128 hi def link radianceExtraType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
129 hi def link radianceSurfType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
130 hi def link radianceLightType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
131 hi def link radianceMatType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
132 hi def link radiancePatType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
133 hi def link radianceTexType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
134 hi def link radianceMixType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
135 hi def link radianceComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
136 hi def link radianceCommand Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
137 hi def link radianceID String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
138 hi def link radianceTodo Todo |
7 | 139 |
140 let b:current_syntax = "radiance" | |
141 | |
142 " vim: ts=8 sw=2 |