aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Highlighting/Resources/Boo.xshd
blob: a4e5551987387082dd27f5a304350dd57d47a936 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<SyntaxDefinition name="Boo" extensions=".boo" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
	<Color name="Comment" foreground="Green" />
	<Color name="String" foreground="Blue" />
	<Color name="Regex" foreground="#FFFF6600" />
	<RuleSet>
		<Span color="Comment" multiline="true">
			<Begin>"""</Begin>
			<End>"""</End>
		</Span>
		<Span foreground="Gray">
			<Begin>\#</Begin>
		</Span>
		<Span foreground="#FF999999">
			<Begin>//</Begin>
		</Span>
		<Span color="Comment" ruleSet="comments set" multiline="true">
			<Begin>/\*</Begin>
			<End>\*/</End>
		</Span>
		<Span color="String">
			<Begin>"</Begin>
			<End>"</End>
			<RuleSet>
				<Span begin="\\" end="." />
				<Span foreground="#FF993366" ruleSet="">
					<!-- ruleSet="" reference this file's main ruleset, allowing normal boo code inside ${} -->
					<Begin>\$\{</Begin>
					<End>}</End>
				</Span>
			</RuleSet>
		</Span>
		<Span color="String">
			<Begin>'</Begin>
			<End>'</End>
			<RuleSet>
				<Span begin="\\" end="." />
			</RuleSet>
		</Span>
		<Span color="Regex" multiline="true">
			<Begin>@/</Begin>
			<End>/</End>
		</Span>
		<Span color="Regex">
			<!-- this is a span (not a rule) because " within a regex doesn't start a string literal -->
			<Begin>/\S+/</Begin>
			<End></End> <!-- end immediately after Begin -->
		</Span>
		<Keywords foreground="Black" fontWeight="bold">
			<Word>self</Word>
			<Word>super</Word>
		</Keywords>
		<Keywords foreground="DarkCyan" fontWeight="bold">
			<Word>is</Word>
			<Word>isa</Word>
			<Word>and</Word>
			<Word>or</Word>
			<Word>not</Word>
		</Keywords>
		<Keywords foreground="Blue" fontWeight="bold">
			<Word>else</Word>
			<Word>elif</Word>
			<Word>if</Word>
			<Word>match</Word>
			<Word>case</Word>
			<Word>unless</Word>
			<Word>otherwise</Word>
			<Word>for</Word>
			<Word>in</Word>
			<Word>while</Word>
		</Keywords>
		<Keywords foreground="Navy">
			<Word>break</Word>
			<Word>continue</Word>
			<Word>return</Word>
			<Word>yield</Word>
			<Word>goto</Word>
		</Keywords>
		<Keywords foreground="Teal" fontWeight="bold">
			<Word>try</Word>
			<Word>raise</Word>
			<Word>ensure</Word>
			<Word>except</Word>
			<Word>retry</Word>
			<Word>success</Word>
		</Keywords>
		<Keywords foreground="Olive">
			<Word>fixed</Word>
			<Word>unsafe</Word>
		</Keywords>
		<Keywords foreground="Purple" fontWeight="bold">
			<Word>bool</Word>
			<Word>double</Word>
			<Word>single</Word>
			<Word>byte</Word>
			<Word>sbyte</Word>
			<Word>short</Word>
			<Word>ushort</Word>
			<Word>int</Word>
			<Word>uint</Word>
			<Word>long</Word>
			<Word>ulong</Word>
			<Word>date</Word>
			<Word>timespan</Word>
			<Word>decimal</Word>
			<Word>char</Word>
			<Word>object</Word>
			<Word>duck</Word>
			<Word>string</Word>
			<Word>regex</Word>
		</Keywords>
		<Keywords foreground="Red">
			<Word>void</Word>
		</Keywords>
		<Keywords foreground="Blue" fontWeight="bold">
			<Word>cast</Word>
			<Word>as</Word>
		</Keywords>
		<Keywords foreground="Brown">
			<Word>override</Word>
			<Word>static</Word>
			<Word>virtual</Word>
			<Word>abstract</Word>
			<Word>final</Word>
			<Word>transient</Word>
			<Word>partial</Word>
		</Keywords>
		<Keywords foreground="Blue" fontWeight="bold">
			<Word>public</Word>
			<Word>protected</Word>
			<Word>private</Word>
			<Word>internal</Word>
		</Keywords>
		<Keywords foreground="Green" fontWeight="bold">
			<Word>namespace</Word>
			<Word>import</Word>
			<Word>from</Word>
		</Keywords>
		<Keywords foreground="SaddleBrown">
			<Word>get</Word>
			<Word>set</Word>
		</Keywords>
		<Keywords foreground="Black" fontWeight="bold">
			<Word>null</Word>
			<Word>value</Word>
			<Word>true</Word>
			<Word>false</Word>
			<Word>ast</Word>
		</Keywords>
		<Keywords foreground="Maroon">
			<Word>using</Word>
			<Word>unchecked</Word>
			<Word>checked</Word>
			<Word>lock</Word>
			<Word>getter</Word>
			<Word>required</Word>
			<Word>rawArrayIndexing</Word>
			<Word>normalArrayIndexing</Word>
			<Word>yieldAll</Word>
		</Keywords>
		<Keywords foreground="Purple">
			<Word>assert</Word>
			<Word>array</Word>
			<Word>matrix</Word>
			<Word>print</Word>
			<Word>gets</Word>
			<Word>prompt</Word>
			<Word>enumerate</Word>
			<Word>zip</Word>
			<Word>filter</Word>
			<Word>map</Word>
			<Word>cat</Word>
			<Word>__eval__</Word>
			<Word>__switch__</Word>
		</Keywords>
		<Keywords foreground="Blue" fontWeight="bold">
			<Word>constructor</Word>
			<Word>destructor</Word>
			<Word>def</Word>
			<Word>include</Word>
			<Word>event</Word>
			<Word>ref</Word>
		</Keywords>
		<Keywords foreground="Gray">
			<Word>pass</Word>
		</Keywords>
		<Keywords foreground="Blue" fontWeight="bold">
			<Word>enum</Word>
			<Word>class</Word>
			<Word>struct</Word>
			<Word>interface</Word>
			<Word>mixin</Word>
			<Word>callable</Word>
			<Word>do</Word>
			<Word>of</Word>
		</Keywords>
		<Rule foreground="MidnightBlue">[\d\w_]+(?=(\s*\())</Rule>
		<Rule foreground="DarkBlue">\b0[xX][0-9a-fA-F]+|(\b\d+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?</Rule>
	</RuleSet>
	<RuleSet name="comments set">
		<!-- allows nested /**/ comments, coloring them Green/Teal alternately -->
		<Span foreground="Teal" multiline="true">
			<Begin>/\*</Begin>
			<End>\*/</End>
			<RuleSet>
				<Span color="Comment" ruleSet="comments set" multiline="true">
					<Begin>/\*</Begin>
					<End>\*/</End>
				</Span>
			</RuleSet>
		</Span>
	</RuleSet>
</SyntaxDefinition>