1 <?xml version=
"1.0" encoding=
"UTF-8"?>
3 <language id=
"supercollider" _name=
"SuperCollider" version=
"2.0" _section=
"Sources">
5 <property name=
"mimetypes">text/x-sc
</property>
6 <property name=
"globs">*.sc;*.scd
</property>
7 <property name=
"line-comment-start">//
</property>
8 <property name=
"block-comment-start">/*
</property>
9 <property name=
"block-comment-end">*/
</property>
13 <style id=
"comment" _name=
"Comment" map-to=
"def:comment"/>
14 <style id=
"error" _name=
"Error" map-to=
"def:error"/>
15 <style id=
"keyword" _name=
"Keyword" map-to=
"def:keyword"/>
16 <style id=
"number" _name=
"Number" map-to=
"def:number"/>
20 <style id=
"string" _name=
"String" map-to=
"def:string"/>
21 <style id=
"symbol" _name=
"Symbol" map-to=
"def:string"/>
25 <style id=
"class-name" _name=
"Class Name" map-to=
"def:type"/>
26 <style id=
"special-value" _name=
"Special Value" map-to=
"def:special-constant"/>
27 <style id=
"pseudo-variable" _name=
"Pseudo Variable" map-to=
"def:identifier"/>
31 <context id=
"line-comment" style-ref=
"comment" end-at-line-end=
"true">
34 <context ref=
"def:in-comment"/>
38 <context id=
"block-comment" style-ref=
"comment">
42 <context ref=
"def:in-comment"/>
43 <context ref=
"block-comment"/> <!-- nested comments are okay -->
47 <context id=
"close-comment-outside-comment" style-ref=
"error">
48 <match>\*/(?!\*)
</match>
52 <context id=
"numbers" style-ref=
"number">
56 3. base-n. "-" (in some cases) can be placed before and after 'r' (one or both means negative)
57 4. exponential notation supports only digits (not letters) after the "e" sign
59 <match extended=
"true">
63 (\-?)([
0-
9]+)(\.[
0-
9]+)?(pi)? |
64 (\-?)([
0-
9]+[rR]{
1,
1})((\-?)[
0-
9A-Za-z\.]*)(pi)? |
65 (\-?)([
0-
9]+)(\.[
0-
9]+)?e(\-?)([
0-
9]+)(pi)?
72 <!-- XXX $\x evaluates as well as $x -->
73 <!-- $\t, $\n, etc. work as expected -->
74 <context id=
"characters" style-ref=
"string">
75 <match>\$(\\?).
</match>
79 <context id=
"strings" style-ref=
"string" end-at-line-end=
"false">
83 <context ref=
"def:escape"/>
87 <!-- symbols (quoted) -->
88 <context id=
"quoted-symbols" style-ref=
"symbol" end-at-line-end=
"true">
92 <context ref=
"def:escape"/>
97 <context id=
"symbols" style-ref=
"symbol">
102 <!-- classes may not start with "_" -->
103 <context id=
"class-names" style-ref=
"class-name">
104 <keyword>[A-Z]\w*
</keyword>
107 <context id=
"special-values" style-ref=
"special-value">
108 <keyword>true
</keyword>
109 <keyword>false
</keyword>
110 <keyword>nil
</keyword>
111 <keyword>inf
</keyword>
114 <context id=
"keywords" style-ref=
"keyword">
115 <keyword>var
</keyword>
116 <keyword>arg
</keyword>
117 <keyword>classvar
</keyword>
118 <keyword>const
</keyword>
121 <context id=
"control-operators" style-ref=
"keyword">
122 <keyword>if
</keyword>
123 <keyword>while
</keyword>
124 <keyword>forBy
</keyword>
125 <keyword>for
</keyword>
126 <keyword>do
</keyword>
127 <keyword>switch
</keyword>
128 <keyword>case
</keyword>
129 <keyword>loop
</keyword> <!-- not in Control-Structures.html -->
132 <context id=
"pseudo-variables" style-ref=
"pseudo-variable">
133 <keyword>super
</keyword>
134 <keyword>thisFunctionDef
</keyword>
135 <keyword>thisFunction
</keyword>
136 <keyword>thisMethod
</keyword>
137 <keyword>thisProcess
</keyword>
138 <keyword>thisThread
</keyword>
139 <keyword>this
</keyword>
142 <context id=
"supercollider">
144 <context ref=
"line-comment"/>
145 <context ref=
"block-comment"/>
146 <context ref=
"close-comment-outside-comment"/>
148 <context ref=
"numbers"/>
149 <context ref=
"characters"/>
150 <context ref=
"strings"/>
151 <context ref=
"quoted-symbols"/>
152 <context ref=
"symbols"/>
154 <context ref=
"class-names"/>
155 <context ref=
"special-values"/>
157 <context ref=
"keywords"/>
158 <context ref=
"control-operators"/>
159 <context ref=
"pseudo-variables"/>