Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 309 lines (262 sloc) 9.543 kb
e6924553 »
2008-10-27 Initial commit
1 <?xml version="1.0"?>
2
3 <!DOCTYPE MODE SYSTEM "xmode.dtd">
4
5 <MODE>
6 <PROPS>
7 <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
8 <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
9 <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
2e051202 »
2009-04-22 More robust auto-indentation
10 <PROPERTY NAME="indentNextLine"
f7023ae8 »
2009-04-25 Auto-indent even where the trigger is not the first expr
11 VALUE="(.*((if|while|else\s+if|for)\s*\().*\)|\s*else|\s*case.*=>|.*(def|val|var|type).*=)\s*$"/>
e6924553 »
2008-10-27 Initial commit
12 <!-- set this to 'true' if you want to use GNU coding style -->
13 <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
14 <PROPERTY NAME="commentStart" VALUE="/*" />
15 <PROPERTY NAME="commentEnd" VALUE="*/" />
16 <PROPERTY NAME="lineComment" VALUE="//" />
17 <PROPERTY NAME="noTabs" VALUE="true" />
18 <PROPERTY NAME="tabSize" VALUE="2" />
19 <PROPERTY NAME="indentSize" VALUE="2" />
20 <PROPERTY NAME="wordBreakChars" VALUE=",+-=&lt;&gt;/?^&amp;*" />
21 </PROPS>
22
f8a99888 »
2011-02-25 Fixed backslash symbol as a method name
23 <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE"
e6924553 »
2008-10-27 Initial commit
24 DIGIT_RE="(0[lL]?|[1-9]\d{0,9}(\d{0,9}[lL])?|0[xX]\p{XDigit}{1,8}(\p{XDigit}{0,8}[lL])?|0[0-7]{1,11}([0-7]{0,11}[lL])?|([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?|[0-9]+([eE][+-]?[0-9]+[fFdD]?|([eE][+-]?[0-9]+)?[fFdD]))">
06f19312 »
2008-11-26 El Bizarro hack for annotations vs patterns
25
26 <MARK_FOLLOWING TYPE="LABEL">@</MARK_FOLLOWING>
27
28 <IMPORT DELEGATE="PRIMARY"/>
29 </RULES>
30
31 <RULES SET="PRIMARY">
e6924553 »
2008-10-27 Initial commit
32 <!-- Silly comment -->
33 <SEQ TYPE="COMMENT1">/**/</SEQ>
34
35 <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
36
37 <!-- Scaladoc comment -->
38 <SPAN TYPE="COMMENT3" DELEGATE="SCALADOC">
39 <BEGIN>/**</BEGIN>
40 <END>*/</END>
41 </SPAN>
42
43 <!-- Scala comment (Java style) -->
44 <SPAN TYPE="COMMENT1">
45 <BEGIN>/*</BEGIN>
46 <END>*/</END>
47 </SPAN>
aa62c692 »
2011-05-04 Rewrote support for highlighting of XML literals (recursive rule sets…
48
ec40b6a4 »
2011-05-16 Fixed nested braces inside XML literals
49 <SPAN MATCH_TYPE="NULL" DELEGATE="MAIN">
50 <BEGIN>{</BEGIN>
51 <END>}</END>
52 </SPAN>
53
aa62c692 »
2011-05-04 Rewrote support for highlighting of XML literals (recursive rule sets…
54 <!-- XML literals; keep this in sync with the XML_LITERAL rule set! -->
d354bc71 »
2011-05-04 Added support for XML processing instructions; refactored out XML_SHA…
55 <IMPORT DELEGATE="XML_SHARED"/>
e6924553 »
2008-10-27 Initial commit
56
57 <!-- string and character literals -->
9a04e919 »
2012-08-29 Fix escape for multi-line comments
58 <SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE" ESCAPE="">
ce84df55 »
2008-11-24 Fixed """ string literals
59 <BEGIN>"""</BEGIN>
60 <END>"""</END>
61 </SPAN>
f8a99888 »
2011-02-25 Fixed backslash symbol as a method name
62 <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" ESCAPE="\">
e6924553 »
2008-10-27 Initial commit
63 <BEGIN>"</BEGIN>
64 <END>"</END>
65 </SPAN>
7d339b34 »
2011-10-02 Fixed escaping inside Scala character literals
66 <SEQ_REGEXP HASH_CHAR="'" TYPE="LITERAL1">'([^'\\]|\\.)'</SEQ_REGEXP>
e6924553 »
2008-10-27 Initial commit
67
68 <!-- symbol literals -->
93220212 »
2008-12-04 Fixed symbol regexp (I think)
69 <SEQ_REGEXP HASH_CHAR="'" TYPE="LABEL">'[0-9a-zA-Z&gt;&lt;=+]([0-9a-zA-Z&gt;&lt;=+]|_[0-9a-zA-Z&gt;&lt;=+])*</SEQ_REGEXP>
e6924553 »
2008-10-27 Initial commit
70
17856ced »
2009-04-24 Support for type parameters nested to an arbitrary depth
71 <SPAN MATCH_TYPE="LITERAL3" DELEGATE="TYPE_PARAMS">
72 <BEGIN>[</BEGIN>
73 <END>]</END>
74 </SPAN>
881f0f14 »
2011-02-25 Added (basic) support for backtic escapes
75
76 <SPAN MATCH_TYPE="NULL">
77 <BEGIN>`</BEGIN>
78 <END>`</END>
79 </SPAN>
e6924553 »
2008-10-27 Initial commit
80
31d98f11 »
2009-04-24 Added '(' to the set of operators
81 <SEQ TYPE="OPERATOR">(</SEQ>
e6924553 »
2008-10-27 Initial commit
82 <SEQ TYPE="OPERATOR">)</SEQ>
83 <SEQ TYPE="OPERATOR">}</SEQ>
84 <SEQ TYPE="OPERATOR">{</SEQ>
85 <SEQ TYPE="NULL">.</SEQ>
86 <SEQ TYPE="NULL">,</SEQ>
87 <SEQ TYPE="NULL">;</SEQ>
88 <SEQ TYPE="NULL">:</SEQ>
89
90 <!-- Function calls -->
9cab4ca7 »
2009-04-22 More consistent (and less ambitious) function highlighting
91 <!-- <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS> -->
92
93 <!-- Function declarations (overloaded for different spacing styles)-->
94 <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">def </MARK_FOLLOWING>
95 <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">def </MARK_FOLLOWING>
96 <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">def </MARK_FOLLOWING>
97 <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">def </MARK_FOLLOWING>
98 <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">def </MARK_FOLLOWING>
99 <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">def </MARK_FOLLOWING>
100 <MARK_FOLLOWING TYPE="FUNCTION" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE">def </MARK_FOLLOWING>
101
fa936fec »
2008-12-01 Fixed case...er, case issue
102 <SPAN DELEGATE="PATTERN" MATCH_TYPE="KEYWORD1" AT_WORD_START="TRUE" NO_LINE_BREAK="TRUE">
103 <BEGIN>case </BEGIN>
06f19312 »
2008-11-26 El Bizarro hack for annotations vs patterns
104 <END>=&gt;</END>
fa936fec »
2008-12-01 Fixed case...er, case issue
105 </SPAN>
e6924553 »
2008-10-27 Initial commit
106
fa936fec »
2008-12-01 Fixed case...er, case issue
107 <KEYWORDS>
e6924553 »
2008-10-27 Initial commit
108 <KEYWORD1>abstract</KEYWORD1>
c7d7e669 »
2008-12-02 Case as dummy keyword (slicker text input); No escape from """
109 <KEYWORD1>case</KEYWORD1>
e6924553 »
2008-10-27 Initial commit
110 <KEYWORD1>catch</KEYWORD1>
111 <KEYWORD1>class</KEYWORD1>
112 <KEYWORD1>def</KEYWORD1>
113 <KEYWORD1>do</KEYWORD1>
114 <KEYWORD1>else</KEYWORD1>
115 <KEYWORD1>extends</KEYWORD1>
116 <KEYWORD1>final</KEYWORD1>
117 <KEYWORD1>finally</KEYWORD1>
118 <KEYWORD1>for</KEYWORD1>
119 <KEYWORD1>forSome</KEYWORD1>
120 <KEYWORD1>if</KEYWORD1>
121 <KEYWORD1>implicit</KEYWORD1>
122 <KEYWORD1>import</KEYWORD1>
123 <KEYWORD1>lazy</KEYWORD1>
124 <KEYWORD1>match</KEYWORD1>
125 <KEYWORD1>new</KEYWORD1>
126 <KEYWORD1>object</KEYWORD1>
127 <KEYWORD1>override</KEYWORD1>
128 <KEYWORD1>package</KEYWORD1>
129 <KEYWORD1>private</KEYWORD1>
130 <KEYWORD1>protected</KEYWORD1>
131 <KEYWORD1>requires</KEYWORD1>
132 <KEYWORD1>return</KEYWORD1>
133 <KEYWORD1>sealed</KEYWORD1>
134 <KEYWORD1>throw</KEYWORD1>
135 <KEYWORD1>trait</KEYWORD1>
136 <KEYWORD1>try</KEYWORD1>
137 <KEYWORD1>type</KEYWORD1>
138 <KEYWORD1>val</KEYWORD1>
139 <KEYWORD1>var</KEYWORD1>
140 <KEYWORD1>with</KEYWORD1>
141 <KEYWORD1>while</KEYWORD1>
142 <KEYWORD1>yield</KEYWORD1>
143 <KEYWORD1>=&gt;</KEYWORD1>
144
145 <!-- java.lang.* wrapper types -->
146 <KEYWORD2>Character</KEYWORD2>
147 <KEYWORD2>Integer</KEYWORD2>
148
149 <!-- scala.* primitive types -->
150 <KEYWORD2>Boolean</KEYWORD2>
151 <KEYWORD2>Byte</KEYWORD2>
152 <KEYWORD2>Char</KEYWORD2>
153 <KEYWORD2>Double</KEYWORD2>
154 <KEYWORD2>Float</KEYWORD2>
155 <KEYWORD2>Int</KEYWORD2>
156 <KEYWORD2>Long</KEYWORD2>
157 <KEYWORD2>Short</KEYWORD2>
158 <KEYWORD2>Unit</KEYWORD2>
159
160 <!-- scala.* predefined types -->
161 <KEYWORD3>Any</KEYWORD3>
162 <KEYWORD3>AnyRef</KEYWORD3>
1baeb5ed »
2011-10-02 Removed all the pre-defined type stuff (makes highlighting too incons…
163 <KEYWORD3>Nothing</KEYWORD3>
e6924553 »
2008-10-27 Initial commit
164
165 <LITERAL2>false</LITERAL2>
166 <LITERAL2>null</LITERAL2>
167 <LITERAL2>super</LITERAL2>
168 <LITERAL2>this</LITERAL2>
169 <LITERAL2>true</LITERAL2>
170 </KEYWORDS>
171 </RULES>
06f19312 »
2008-11-26 El Bizarro hack for annotations vs patterns
172
17856ced »
2009-04-24 Support for type parameters nested to an arbitrary depth
173 <RULES SET="TYPE_PARAMS" DEFAULT="LITERAL3">
174 <SPAN MATCH_TYPE="LITERAL3" DELEGATE="TYPE_PARAMS">
175 <BEGIN>[</BEGIN>
176 <END>]</END>
177 </SPAN>
178 </RULES>
179
06f19312 »
2008-11-26 El Bizarro hack for annotations vs patterns
180 <RULES SET="PATTERN" DEFAULT="NULL" IGNORE_CASE="FALSE">
181 <IMPORT DELEGATE="PRIMARY"/>
182
183 <SEQ TYPE="OPERATOR">@</SEQ>
184 </RULES>
e6924553 »
2008-10-27 Initial commit
185
186 <RULES SET="SCALADOC" DEFAULT="COMMENT3" IGNORE_CASE="TRUE">
187 <!-- so that @link{...} is highlighted -->
188 <SEQ TYPE="COMMENT3">{</SEQ>
189
190 <!-- so that *@param is highlighted -->
191 <SEQ TYPE="COMMENT3">*</SEQ>
192
193 <!-- Javadoc ignores tags inside <pre> -->
194 <SPAN TYPE="MARKUP" DELEGATE="SCALADOC_PRE">
195 <BEGIN>&lt;pre&gt;</BEGIN>
196 <END>&lt;/pre&gt;</END>
197 </SPAN>
198
199 <!-- HTML comments -->
200 <SPAN TYPE="COMMENT1">
201 <BEGIN>&lt;!--</BEGIN>
202 <END>--&gt;</END>
203 </SPAN>
204
205 <!-- HTML tags -->
499f977f »
2011-07-25 Fixed general use of &lt; in scaladoc comments
206 <SPAN_REGEXP HASH_CHAR="&lt;" TYPE="MARKUP" DELEGATE="xml::TAGS" NO_LINE_BREAK="TRUE">
207 <BEGIN>&lt;/?[\da-zA-Z\-]+</BEGIN>
e6924553 »
2008-10-27 Initial commit
208 <END>&gt;</END>
499f977f »
2011-07-25 Fixed general use of &lt; in scaladoc comments
209 </SPAN_REGEXP>
210
211 <!-- Javadoc allows this -->
212 <SEQ TYPE="COMMENT3">&lt;</SEQ>
e6924553 »
2008-10-27 Initial commit
213
214 <KEYWORDS>
215 <LABEL>@author</LABEL>
216 <LABEL>@beaninfo</LABEL>
217 <LABEL>@history</LABEL>
218 <LABEL>@bug</LABEL>
219 <LABEL>@review</LABEL>
220 <LABEL>@todo</LABEL>
221 <LABEL>@idea</LABEL>
222 <LABEL>@pre</LABEL>
223 <LABEL>@requires</LABEL>
224 <LABEL>@post</LABEL>
225 <LABEL>@ensures</LABEL>
226 <LABEL>@generates</LABEL>
227 <LABEL>@modifies</LABEL>
228 <LABEL>@invariant</LABEL>
229 <LABEL>@exception</LABEL>
230 <LABEL>@hides</LABEL>
231 <LABEL>@overrides</LABEL>
232 <LABEL>@equivalent</LABEL>
233 <LABEL>@bon</LABEL>
234 <LABEL>@access</LABEL>
235 <LABEL>@example</LABEL>
236 <LABEL>@design</LABEL>
237 <LABEL>@serial</LABEL>
238 <LABEL>@references</LABEL>
239 <LABEL>@uses</LABEL>
240 <LABEL>@guard</LABEL>
241 <LABEL>@values</LABEL>
242 <LABEL>@complexity</LABEL>
243 <LABEL>@deprecated</LABEL>
244 <LABEL>@docRoot</LABEL>
245 <LABEL>@exception</LABEL>
246 <LABEL>@link</LABEL>
247 <LABEL>@param</LABEL>
248 <LABEL>@return</LABEL>
249 <LABEL>@see</LABEL>
250 <LABEL>@serialData</LABEL>
251 <LABEL>@serialField</LABEL>
252 <LABEL>@since</LABEL>
253 <LABEL>@throws</LABEL>
254 <LABEL>@version</LABEL>
255 <LABEL>@spec</LABEL>
256 </KEYWORDS>
257 </RULES>
258
259 <RULES SET="SCALADOC_PRE" DEFAULT="COMMENT3" />
aa62c692 »
2011-05-04 Rewrote support for highlighting of XML literals (recursive rule sets…
260
d354bc71 »
2011-05-04 Added support for XML processing instructions; refactored out XML_SHA…
261 <RULES SET="XML_SHARED">
aa62c692 »
2011-05-04 Rewrote support for highlighting of XML literals (recursive rule sets…
262 <SPAN TYPE="COMMENT2">
263 <BEGIN>&lt;!--</BEGIN>
264 <END>--&gt;</END>
265 </SPAN>
266
d354bc71 »
2011-05-04 Added support for XML processing instructions; refactored out XML_SHA…
267 <SPAN TYPE="LITERAL3">
268 <BEGIN>&lt;?</BEGIN>
269 <END>?&gt;</END>
270 </SPAN>
945d21a6 »
2011-05-04 Added support for CDATA literals
271
272 <SPAN MATCH_TYPE="LITERAL3" TYPE="COMMENT4">
273 <BEGIN>&lt;![CDATA[</BEGIN>
274 <END>]]&gt;</END>
275 </SPAN>
aa62c692 »
2011-05-04 Rewrote support for highlighting of XML literals (recursive rule sets…
276
fc488b29 »
2011-05-04 Made XML literal name recognition (and attr parsing) substantially sm…
277 <SEQ_REGEXP HASH_CHAR="&lt;" TYPE="LITERAL3">&lt;([\d\w_\-:.]+)(\s+[\d\w_\-:.]+=('[^']*'|"[^"]*"))*\s*/\s*&gt;</SEQ_REGEXP>
aa62c692 »
2011-05-04 Rewrote support for highlighting of XML literals (recursive rule sets…
278
d354bc71 »
2011-05-04 Added support for XML processing instructions; refactored out XML_SHA…
279 <SPAN_REGEXP DELEGATE="XML_LITERAL" HASH_CHAR="&lt;" MATCH_TYPE="LITERAL3" TYPE="NULL">
fc488b29 »
2011-05-04 Made XML literal name recognition (and attr parsing) substantially sm…
280 <BEGIN>&lt;([\d\w_\-:.]+)(\s+[\d\w_\-:.]+=('[^']*'|"[^"]*"))*\s*&gt;</BEGIN>
aa62c692 »
2011-05-04 Rewrote support for highlighting of XML literals (recursive rule sets…
281 <END>&lt;/$1&gt;</END>
282 </SPAN_REGEXP>
d354bc71 »
2011-05-04 Added support for XML processing instructions; refactored out XML_SHA…
283 </RULES>
284
285 <!-- TODO find a way to highlight attribute names as LABEL, attribute values as LITERAL1 -->
286 <RULES SET="XML_LITERAL" DEFAULT="COMMENT4">
847811ef »
2011-05-05 Added override props for comments inside XML literals
287 <PROPS>
288 <PROPERTY NAME="commentStart" VALUE="&lt;!--" />
289 <PROPERTY NAME="commentEnd" VALUE="--&gt;" />
290 <PROPERTY NAME="lineComment" VALUE="" />
291 </PROPS>
292
d354bc71 »
2011-05-04 Added support for XML processing instructions; refactored out XML_SHA…
293 <IMPORT DELEGATE="XML_SHARED"/>
294
295 <SPAN DELEGATE="MAIN">
296 <BEGIN>{</BEGIN>
297 <END>}</END>
298 </SPAN>
299
300 <SPAN TYPE="LABEL" NO_WORD_BREAK="TRUE">
301 <BEGIN>&amp;</BEGIN>
302 <END>;</END>
303 </SPAN>
aa62c692 »
2011-05-04 Rewrote support for highlighting of XML literals (recursive rule sets…
304
fc488b29 »
2011-05-04 Made XML literal name recognition (and attr parsing) substantially sm…
305 <SEQ_REGEXP HASH_CHAR="&lt;" TYPE="INVALID">&lt;/[\d\w_\-:.]+&gt;</SEQ_REGEXP> <!-- unmatched closing tags -->
e6924553 »
2008-10-27 Initial commit
306 </RULES>
307 </MODE>
308
Something went wrong with that request. Please try again.