Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HiveProjectManagement/HeuristicLab.ExtLibs/HeuristicLab.AvalonEdit/5.0.1/AvalonEdit-5.0.1/Highlighting/Resources/Boo.xshd @ 15377

Last change on this file since 15377 was 11700, checked in by jkarder, 10 years ago

#2077: created branch and added first version

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