rubybuntu-gedit 11.08.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +20 -0
- data/Rakefile +28 -0
- data/bin/rubybuntu-gedit +88 -0
- data/data/language-specs/README.rdoc +73 -0
- data/data/language-specs/erb.lang +53 -0
- data/data/language-specs/html-erb.lang +48 -0
- data/data/language-specs/javascript-erb.lang +23 -0
- data/data/language-specs/ruby-bundler-gemfile-lock.lang +101 -0
- data/data/language-specs/ruby-erb.lang +22 -0
- data/data/language-specs/ruby.lang +1068 -0
- data/data/language-specs/ruby.lang-extras/important-constants.rb +7 -0
- data/data/language-specs/ruby.lang-extras/important-methods.rb +3 -0
- data/data/language-specs/ruby.lang-extras/known-bugs.rb +11 -0
- data/data/language-specs/xml-erb.lang +22 -0
- data/data/language-specs/yml-erb.lang +21 -0
- data/data/mime/README.rdoc +17 -0
- data/data/mime/cucumber.xml +9 -0
- data/data/mime/haml.xml +8 -0
- data/data/mime/ruby-builder.xml +9 -0
- data/data/mime/ruby-bundler.xml +13 -0
- data/data/mime/ruby-capistrano.xml +9 -0
- data/data/mime/ruby-erb.xml +62 -0
- data/data/mime/ruby-rack.xml +8 -0
- data/data/mime/ruby-rake.xml +10 -0
- data/data/mime/ruby-thor.xml +10 -0
- data/data/mime/ruby.xml +13 -0
- data/data/mime/sass.xml +14 -0
- data/data/mime/slim.xml +8 -0
- data/data/snippets/MIT-LICENSE +20 -0
- data/data/snippets/README.textile +108 -0
- data/data/snippets/TODO +6 -0
- data/data/snippets/cheatsheet.html +1602 -0
- data/data/snippets/doc/Gemfile +6 -0
- data/data/snippets/doc/Gemfile.lock +16 -0
- data/data/snippets/doc/create_documentation.rb +56 -0
- data/data/snippets/doc/documentation_stylesheet.sass +100 -0
- data/data/snippets/doc/documentation_stylesheet_print.sass +93 -0
- data/data/snippets/doc/documentation_template.haml +36 -0
- data/data/snippets/doc/gedit-snippets-logo.png +0 -0
- data/data/snippets/doc/gedit-snippets-logo.svg +626 -0
- data/data/snippets/doc/method_parser.rb +24 -0
- data/data/snippets/erb.xml +84 -0
- data/data/snippets/html-erb.xml +84 -0
- data/data/snippets/javascript-erb.xml +84 -0
- data/data/snippets/rails_activerecord_associations.xml +34 -0
- data/data/snippets/rails_activerecord_basic.xml +11 -0
- data/data/snippets/rails_activerecord_validations.xml +210 -0
- data/data/snippets/rails_controllers_basic.xml +19 -0
- data/data/snippets/rhtml_basic.xml +70 -0
- data/data/snippets/rhtml_forms.xml +75 -0
- data/data/snippets/rhtml_html.xml +98 -0
- data/data/snippets/ruby-erb.xml +84 -0
- data/data/snippets/ruby_basic.xml +142 -0
- data/data/snippets/ruby_collections.xml +163 -0
- data/data/snippets/shoulda_actioncontroller.xml +73 -0
- data/data/snippets/shoulda_activerecord.xml +127 -0
- data/data/snippets/shoulda_basic.xml +22 -0
- data/data/snippets/snippet_tools.xml +32 -0
- data/data/snippets/xml-erb.xml +84 -0
- data/data/snippets/yml-erb.xml +84 -0
- data/data/styles/README.rdoc +17 -0
- data/data/styles/rubybuntu1.xml +119 -0
- data/rubybuntu-gedit.gemspec +26 -0
- metadata +125 -0
@@ -0,0 +1,1068 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!--
|
3
|
+
|
4
|
+
Author: Archit Baweja <bighead@users.sourceforge.net>
|
5
|
+
Copyright (C) 2004 Archit Baweja <bighead@users.sourceforge.net>
|
6
|
+
Copyright (C) 2005 Michael Witrant <mike@lepton.fr>
|
7
|
+
Copyright (C) 2006 Gabriel Bauman <gbauman@gmail.com>
|
8
|
+
Copyright (C) 2009 Alexandre da Silva <lexrupy@gmail.com>
|
9
|
+
Copyright (C) 2011 Jan Lelis <mail@janlelis.de>
|
10
|
+
|
11
|
+
This library is free software; you can redistribute it and/or modify
|
12
|
+
it under the terms of the GNU General Public License as published by
|
13
|
+
the Free Software Foundation; either version 2 of the License, or
|
14
|
+
(at your option) any later version.
|
15
|
+
|
16
|
+
This program is distributed in the hope that it will be useful,
|
17
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
19
|
+
GNU General Public License for more details.
|
20
|
+
|
21
|
+
You should have received a copy of the GNU General Public License
|
22
|
+
along with this program; if not, write to the Free Software
|
23
|
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
24
|
+
|
25
|
+
-->
|
26
|
+
<language id="ruby" _name="Ruby" version="2.0" _section="Scripts">
|
27
|
+
<metadata>
|
28
|
+
<property name="mimetypes">application/x-ruby;text/x-ruby</property>
|
29
|
+
<property name="globs">*.rb;*.gemspec;*.rake;*.ru;*thor;Rakefile;Capfile;Gemfile;Thorfile;.irbrc</property>
|
30
|
+
<property name="line-comment-start">#</property>
|
31
|
+
<property name="block-comment-start">=begin</property>
|
32
|
+
<property name="block-comment-end">=end</property>
|
33
|
+
</metadata>
|
34
|
+
|
35
|
+
<styles>
|
36
|
+
<style id="method" _name="Method or local variable" map-to="def:identifier"/>
|
37
|
+
<style id="important-method" _name="Important methods" map-to="def:builtin"/>
|
38
|
+
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
39
|
+
<style id="syntax-char" _name="Syntactical characters" map-to="ruby:keyword"/>
|
40
|
+
<style id="operator" _name="Operators" map-to="def:operator"/>
|
41
|
+
<style id="special-value" _name="nil, false, true" map-to="def:boolean"/>
|
42
|
+
<style id="self" _name="self" map-to="ruby:special-value"/>
|
43
|
+
<style id="true" _name="true" map-to="ruby:special-value"/>
|
44
|
+
<style id="false" _name="false" map-to="ruby:special-value"/>
|
45
|
+
<style id="nil" _name="nil" map-to="ruby:special-value"/>
|
46
|
+
<style id="collection" _name="Collections (Arrays, Hashes)" map-to="ruby:syntax-char"/>
|
47
|
+
<style id="function" _name="Function definition" map-to="def:function"/>
|
48
|
+
|
49
|
+
<style id="constant" _name="Constant" map-to="def:constant"/>
|
50
|
+
<style id="important-constant" _name="Important constant" map-to="def:special-constant"/>
|
51
|
+
|
52
|
+
<style id="instance-variable" _name="Instance variable" map-to="def:identifier"/>
|
53
|
+
<style id="class-variable" _name="Class variable" map-to="ruby:instance-variable"/>
|
54
|
+
<style id="global-variable" _name="Global variable" map-to="def:identifier"/>
|
55
|
+
<style id="special-variable" _name="Special variable" map-to="ruby:global-variable"/>
|
56
|
+
|
57
|
+
<style id="comment" _name="Comment" map-to="def:comment"/>
|
58
|
+
<style id="encoding-comment" _name="Magic Comment" map-to="def:shebang"/>
|
59
|
+
<style id="comment-tag" _name="YARD comment tag" map-to="def:doc-comment"/>
|
60
|
+
<!--style id="comment-tag-value" _name="YARD comment tag value" map-to="def:doc-comment-element"/-->
|
61
|
+
|
62
|
+
<style id="string" _name="String" map-to="def:string"/>
|
63
|
+
<style id="string-delimiter" _name="String delimiter" map-to="ruby:string"/>
|
64
|
+
<style id="character" _name="Character in question mark notation" map-to="def:character"/>
|
65
|
+
<style id="special-char" _name="Escaped Character" map-to="def:special-char"/>
|
66
|
+
|
67
|
+
<style id="system" _name="System command" map-to="ruby:string"/>
|
68
|
+
<style id="system-delimiter" _name="System command delimiter" map-to="ruby:system"/>
|
69
|
+
|
70
|
+
<style id="symbol" _name="Symbol" map-to="ruby:function"/>
|
71
|
+
<style id="symbol-delimiter" _name="Symbol delimiter" map-to="ruby:symbol"/>
|
72
|
+
|
73
|
+
<style id="regex" _name="Regular expression" map-to="ruby:string"/>
|
74
|
+
<style id="regex-delimiter" _name="Regular expression delimiter" map-to="ruby:regex"/>
|
75
|
+
<style id="regex-options" _name="Regular expression options" map-to="ruby:regex-delimiter"/>
|
76
|
+
|
77
|
+
<style id="float" _name="Floating point number" map-to="def:floating-point"/>
|
78
|
+
<style id="integer" _name="Integer number" map-to="def:decimal"/>
|
79
|
+
<style id="base-n-integer" _name="Base-N number" map-to="def:base-n-integer"/>
|
80
|
+
|
81
|
+
<style id="error" _name="Erroneous syntax" map-to="def:error"/>
|
82
|
+
</styles>
|
83
|
+
|
84
|
+
<definitions>
|
85
|
+
|
86
|
+
<context id="special-chars" style-ref="special-char">
|
87
|
+
<match>\\((0-7){3}|(x[a-fA-F0-9]{2})|(c\S)|([CM]-\S)|(M-C-\S)|.)</match>
|
88
|
+
</context>
|
89
|
+
|
90
|
+
<context id="multiline-comment" style-ref="comment" class-disabled="no-spell-check">
|
91
|
+
<start>^=begin</start>
|
92
|
+
<end>^=end</end>
|
93
|
+
<include>
|
94
|
+
<context ref="def:in-comment"/>
|
95
|
+
<context ref="in-comment-docs"/>
|
96
|
+
</include>
|
97
|
+
</context>
|
98
|
+
|
99
|
+
<context id="shell-like-comment" style-ref="comment" end-at-line-end="true" class-disabled="no-spell-check">
|
100
|
+
<start>#</start>
|
101
|
+
<include>
|
102
|
+
<context ref="def:in-comment"/>
|
103
|
+
<context ref="in-comment-docs"/>
|
104
|
+
</include>
|
105
|
+
</context>
|
106
|
+
|
107
|
+
<context id="in-comment-docs" style-ref="comment-tag" extend-parent="false">
|
108
|
+
<match>@\w+(\s*\[.*?\])?</match>
|
109
|
+
</context>
|
110
|
+
|
111
|
+
<context id="encoding-comment" style-ref="encoding-comment" class="no-spell-check" first-line-only="true">
|
112
|
+
<match case-sensitive="false">\s*#.*coding.*</match>
|
113
|
+
</context>
|
114
|
+
|
115
|
+
<context id="keywords" style-ref="keyword">
|
116
|
+
<!-- do not highlight methods like .class -->
|
117
|
+
<prefix>(?<![\w\.\:])</prefix>
|
118
|
+
<!-- only put here if not already used at another place -->
|
119
|
+
<keyword>BEGIN</keyword>
|
120
|
+
<keyword>END</keyword>
|
121
|
+
<keyword>alias</keyword>
|
122
|
+
<keyword>begin</keyword>
|
123
|
+
<keyword>break</keyword>
|
124
|
+
<keyword>case</keyword>
|
125
|
+
<keyword>class</keyword>
|
126
|
+
<keyword>do</keyword>
|
127
|
+
<keyword>else</keyword>
|
128
|
+
<keyword>elsif</keyword>
|
129
|
+
<keyword>end</keyword>
|
130
|
+
<keyword>ensure</keyword>
|
131
|
+
<keyword>for</keyword>
|
132
|
+
<keyword>if</keyword>
|
133
|
+
<keyword>in</keyword>
|
134
|
+
<keyword>module</keyword>
|
135
|
+
<keyword>next</keyword>
|
136
|
+
<keyword>redo</keyword>
|
137
|
+
<keyword>rescue</keyword>
|
138
|
+
<keyword>retry</keyword>
|
139
|
+
<keyword>return</keyword>
|
140
|
+
<keyword>super</keyword>
|
141
|
+
<keyword>then</keyword>
|
142
|
+
<keyword>undef</keyword>
|
143
|
+
<keyword>unless</keyword>
|
144
|
+
<keyword>until</keyword>
|
145
|
+
<keyword>when</keyword>
|
146
|
+
<keyword>while</keyword>
|
147
|
+
<keyword>yield</keyword>
|
148
|
+
</context>
|
149
|
+
|
150
|
+
<context id="important-methods" style-ref="important-method" extend-parent="false">
|
151
|
+
<keyword>allocate</keyword>
|
152
|
+
<keyword>new</keyword>
|
153
|
+
<keyword>superclass</keyword>
|
154
|
+
<keyword>freeze</keyword>
|
155
|
+
<keyword>to_s</keyword>
|
156
|
+
<keyword>included_modules</keyword>
|
157
|
+
<keyword>include\?</keyword>
|
158
|
+
<keyword>name</keyword>
|
159
|
+
<keyword>ancestors</keyword>
|
160
|
+
<keyword>instance_methods</keyword>
|
161
|
+
<keyword>public_instance_methods</keyword>
|
162
|
+
<keyword>protected_instance_methods</keyword>
|
163
|
+
<keyword>private_instance_methods</keyword>
|
164
|
+
<keyword>constants</keyword>
|
165
|
+
<keyword>const_get</keyword>
|
166
|
+
<keyword>const_set</keyword>
|
167
|
+
<keyword>const_defined\?</keyword>
|
168
|
+
<keyword>const_missing</keyword>
|
169
|
+
<keyword>class_variables</keyword>
|
170
|
+
<keyword>remove_class_variable</keyword>
|
171
|
+
<keyword>class_variable_get</keyword>
|
172
|
+
<keyword>class_variable_set</keyword>
|
173
|
+
<keyword>class_variable_defined\?</keyword>
|
174
|
+
<keyword>module_exec</keyword>
|
175
|
+
<keyword>class_exec</keyword>
|
176
|
+
<keyword>module_eval</keyword>
|
177
|
+
<keyword>class_eval</keyword>
|
178
|
+
<keyword>method_defined\?</keyword>
|
179
|
+
<keyword>public_method_defined\?</keyword>
|
180
|
+
<keyword>private_method_defined\?</keyword>
|
181
|
+
<keyword>protected_method_defined\?</keyword>
|
182
|
+
<keyword>public_class_method</keyword>
|
183
|
+
<keyword>private_class_method</keyword>
|
184
|
+
<keyword>autoload</keyword>
|
185
|
+
<keyword>autoload\?</keyword>
|
186
|
+
<keyword>instance_method</keyword>
|
187
|
+
<keyword>public_instance_method</keyword>
|
188
|
+
<keyword>nil\?</keyword>
|
189
|
+
<keyword>eql\?</keyword>
|
190
|
+
<keyword>hash</keyword>
|
191
|
+
<keyword>class</keyword>
|
192
|
+
<keyword>singleton_class</keyword>
|
193
|
+
<keyword>clone</keyword>
|
194
|
+
<keyword>dup</keyword>
|
195
|
+
<keyword>initialize_dup</keyword>
|
196
|
+
<keyword>initialize_clone</keyword>
|
197
|
+
<keyword>taint</keyword>
|
198
|
+
<keyword>tainted\?</keyword>
|
199
|
+
<keyword>untaint</keyword>
|
200
|
+
<keyword>untrust</keyword>
|
201
|
+
<keyword>untrusted\?</keyword>
|
202
|
+
<keyword>trust</keyword>
|
203
|
+
<keyword>frozen\?</keyword>
|
204
|
+
<keyword>inspect</keyword>
|
205
|
+
<keyword>methods</keyword>
|
206
|
+
<keyword>singleton_methods</keyword>
|
207
|
+
<keyword>protected_methods</keyword>
|
208
|
+
<keyword>private_methods</keyword>
|
209
|
+
<keyword>public_methods</keyword>
|
210
|
+
<keyword>instance_variables</keyword>
|
211
|
+
<keyword>instance_variable_get</keyword>
|
212
|
+
<keyword>instance_variable_set</keyword>
|
213
|
+
<keyword>instance_variable_defined\?</keyword>
|
214
|
+
<keyword>instance_of\?</keyword>
|
215
|
+
<keyword>kind_of\?</keyword>
|
216
|
+
<keyword>is_a\?</keyword>
|
217
|
+
<keyword>tap</keyword>
|
218
|
+
<keyword>send</keyword>
|
219
|
+
<keyword>public_send</keyword>
|
220
|
+
<keyword>respond_to\?</keyword>
|
221
|
+
<keyword>respond_to_missing\?</keyword>
|
222
|
+
<keyword>extend</keyword>
|
223
|
+
<keyword>display</keyword>
|
224
|
+
<keyword>method</keyword>
|
225
|
+
<keyword>public_method</keyword>
|
226
|
+
<keyword>define_singleton_method</keyword>
|
227
|
+
<keyword>__id__</keyword>
|
228
|
+
<keyword>object_id</keyword>
|
229
|
+
<keyword>to_enum</keyword>
|
230
|
+
<keyword>enum_for</keyword>
|
231
|
+
<keyword>equal\?</keyword>
|
232
|
+
<keyword>instance_eval</keyword>
|
233
|
+
<keyword>instance_exec</keyword>
|
234
|
+
<keyword>__send__</keyword>
|
235
|
+
<keyword>nesting</keyword>
|
236
|
+
<keyword>sprintf</keyword>
|
237
|
+
<keyword>format</keyword>
|
238
|
+
<keyword>warn</keyword>
|
239
|
+
<keyword>raise</keyword>
|
240
|
+
<keyword>fail</keyword>
|
241
|
+
<keyword>global_variables</keyword>
|
242
|
+
<keyword>__method__</keyword>
|
243
|
+
<keyword>__callee__</keyword>
|
244
|
+
<keyword>eval</keyword>
|
245
|
+
<keyword>local_variables</keyword>
|
246
|
+
<keyword>iterator\?</keyword>
|
247
|
+
<keyword>block_given\?</keyword>
|
248
|
+
<keyword>catch</keyword>
|
249
|
+
<keyword>throw</keyword>
|
250
|
+
<keyword>loop</keyword>
|
251
|
+
<keyword>caller</keyword>
|
252
|
+
<keyword>trace_var</keyword>
|
253
|
+
<keyword>untrace_var</keyword>
|
254
|
+
<keyword>at_exit</keyword>
|
255
|
+
<keyword>syscall</keyword>
|
256
|
+
<keyword>open</keyword>
|
257
|
+
<keyword>printf</keyword>
|
258
|
+
<keyword>print</keyword>
|
259
|
+
<keyword>putc</keyword>
|
260
|
+
<keyword>puts</keyword>
|
261
|
+
<keyword>gets</keyword>
|
262
|
+
<keyword>readline</keyword>
|
263
|
+
<keyword>select</keyword>
|
264
|
+
<keyword>readlines</keyword>
|
265
|
+
<keyword>p</keyword>
|
266
|
+
<keyword>test</keyword>
|
267
|
+
<keyword>srand</keyword>
|
268
|
+
<keyword>rand</keyword>
|
269
|
+
<keyword>trap</keyword>
|
270
|
+
<keyword>exec</keyword>
|
271
|
+
<keyword>fork</keyword>
|
272
|
+
<keyword>exit!</keyword>
|
273
|
+
<keyword>system</keyword>
|
274
|
+
<keyword>spawn</keyword>
|
275
|
+
<keyword>sleep</keyword>
|
276
|
+
<keyword>exit</keyword>
|
277
|
+
<keyword>abort</keyword>
|
278
|
+
<keyword>load</keyword>
|
279
|
+
<keyword>require</keyword>
|
280
|
+
<keyword>require_relative</keyword>
|
281
|
+
<keyword>proc</keyword>
|
282
|
+
<keyword>lambda</keyword>
|
283
|
+
<keyword>binding</keyword>
|
284
|
+
<keyword>set_trace_func</keyword>
|
285
|
+
</context>
|
286
|
+
|
287
|
+
<context id="important-constants" style-ref="important-constant" extend-parent="false">
|
288
|
+
<keyword>Object</keyword>
|
289
|
+
<keyword>Module</keyword>
|
290
|
+
<keyword>Class</keyword>
|
291
|
+
<keyword>Kernel</keyword>
|
292
|
+
<keyword>NilClass</keyword>
|
293
|
+
<keyword>NIL</keyword>
|
294
|
+
<keyword>Data</keyword>
|
295
|
+
<keyword>TrueClass</keyword>
|
296
|
+
<keyword>TRUE</keyword>
|
297
|
+
<keyword>FalseClass</keyword>
|
298
|
+
<keyword>FALSE</keyword>
|
299
|
+
<keyword>Encoding</keyword>
|
300
|
+
<keyword>Comparable</keyword>
|
301
|
+
<keyword>Enumerable</keyword>
|
302
|
+
<keyword>String</keyword>
|
303
|
+
<keyword>Symbol</keyword>
|
304
|
+
<keyword>Exception</keyword>
|
305
|
+
<keyword>SystemExit</keyword>
|
306
|
+
<keyword>SignalException</keyword>
|
307
|
+
<keyword>Interrupt</keyword>
|
308
|
+
<keyword>StandardError</keyword>
|
309
|
+
<keyword>TypeError</keyword>
|
310
|
+
<keyword>ArgumentError</keyword>
|
311
|
+
<keyword>IndexError</keyword>
|
312
|
+
<keyword>KeyError</keyword>
|
313
|
+
<keyword>RangeError</keyword>
|
314
|
+
<keyword>ScriptError</keyword>
|
315
|
+
<keyword>SyntaxError</keyword>
|
316
|
+
<keyword>LoadError</keyword>
|
317
|
+
<keyword>NotImplementedError</keyword>
|
318
|
+
<keyword>NameError</keyword>
|
319
|
+
<keyword>NoMethodError</keyword>
|
320
|
+
<keyword>RuntimeError</keyword>
|
321
|
+
<keyword>SecurityError</keyword>
|
322
|
+
<keyword>NoMemoryError</keyword>
|
323
|
+
<keyword>EncodingError</keyword>
|
324
|
+
<keyword>SystemCallError</keyword>
|
325
|
+
<keyword>Errno</keyword>
|
326
|
+
<keyword>ZeroDivisionError</keyword>
|
327
|
+
<keyword>FloatDomainError</keyword>
|
328
|
+
<keyword>Numeric</keyword>
|
329
|
+
<keyword>Integer</keyword>
|
330
|
+
<keyword>Fixnum</keyword>
|
331
|
+
<keyword>Float</keyword>
|
332
|
+
<keyword>Bignum</keyword>
|
333
|
+
<keyword>Array</keyword>
|
334
|
+
<keyword>Hash</keyword>
|
335
|
+
<keyword>ENV</keyword>
|
336
|
+
<keyword>Struct</keyword>
|
337
|
+
<keyword>RegexpError</keyword>
|
338
|
+
<keyword>Regexp</keyword>
|
339
|
+
<keyword>MatchData</keyword>
|
340
|
+
<keyword>Marshal</keyword>
|
341
|
+
<keyword>Range</keyword>
|
342
|
+
<keyword>IOError</keyword>
|
343
|
+
<keyword>EOFError</keyword>
|
344
|
+
<keyword>IO</keyword>
|
345
|
+
<keyword>STDIN</keyword>
|
346
|
+
<keyword>STDOUT</keyword>
|
347
|
+
<keyword>STDERR</keyword>
|
348
|
+
<keyword>ARGF</keyword>
|
349
|
+
<keyword>FileTest</keyword>
|
350
|
+
<keyword>File</keyword>
|
351
|
+
<keyword>Dir</keyword>
|
352
|
+
<keyword>Time</keyword>
|
353
|
+
<keyword>Random</keyword>
|
354
|
+
<keyword>Signal</keyword>
|
355
|
+
<keyword>Process</keyword>
|
356
|
+
<keyword>Proc</keyword>
|
357
|
+
<keyword>LocalJumpError</keyword>
|
358
|
+
<keyword>SystemStackError</keyword>
|
359
|
+
<keyword>Method</keyword>
|
360
|
+
<keyword>UnboundMethod</keyword>
|
361
|
+
<keyword>Binding</keyword>
|
362
|
+
<keyword>Math</keyword>
|
363
|
+
<keyword>GC</keyword>
|
364
|
+
<keyword>ObjectSpace</keyword>
|
365
|
+
<keyword>Enumerator</keyword>
|
366
|
+
<keyword>StopIteration</keyword>
|
367
|
+
<keyword>RubyVM</keyword>
|
368
|
+
<keyword>Thread</keyword>
|
369
|
+
<keyword>TOPLEVEL_BINDING</keyword>
|
370
|
+
<keyword>ThreadGroup</keyword>
|
371
|
+
<keyword>Mutex</keyword>
|
372
|
+
<keyword>ThreadError</keyword>
|
373
|
+
<keyword>Fiber</keyword>
|
374
|
+
<keyword>FiberError</keyword>
|
375
|
+
<keyword>Rational</keyword>
|
376
|
+
<keyword>Complex</keyword>
|
377
|
+
<keyword>RUBY_VERSION</keyword>
|
378
|
+
<keyword>RUBY_RELEASE_DATE</keyword>
|
379
|
+
<keyword>RUBY_PLATFORM</keyword>
|
380
|
+
<keyword>RUBY_PATCHLEVEL</keyword>
|
381
|
+
<keyword>RUBY_REVISION</keyword>
|
382
|
+
<keyword>RUBY_DESCRIPTION</keyword>
|
383
|
+
<keyword>RUBY_COPYRIGHT</keyword>
|
384
|
+
<keyword>RUBY_ENGINE</keyword>
|
385
|
+
<keyword>ARGV</keyword>
|
386
|
+
<keyword>Gem</keyword>
|
387
|
+
<keyword>BasicObject</keyword>
|
388
|
+
<keyword>DATA</keyword>
|
389
|
+
<keyword>SCRIPT_LINES__</keyword>
|
390
|
+
</context>
|
391
|
+
|
392
|
+
|
393
|
+
<define-regex id="special-variables-1-char">[;@!~&`'+=,/\\_><.*?$:"0-9]</define-regex>
|
394
|
+
<define-regex id="special-variables-2-chars">-[FK0iIvwWdpla]</define-regex>
|
395
|
+
|
396
|
+
<context id="special-variables" style-ref="special-variable">
|
397
|
+
<match extended="true">
|
398
|
+
\$( \%{special-variables-1-char}
|
399
|
+
| \%{special-variables-2-chars}
|
400
|
+
| SAFE
|
401
|
+
| KCODE
|
402
|
+
| FILENAME
|
403
|
+
| LOAD_PATH
|
404
|
+
| LOADED_FEATURES
|
405
|
+
| VERBOSE
|
406
|
+
| DEBUG
|
407
|
+
| PROGRAM_NAME
|
408
|
+
| stdin
|
409
|
+
| stdout
|
410
|
+
| stderr
|
411
|
+
| binding )
|
412
|
+
</match>
|
413
|
+
</context>
|
414
|
+
|
415
|
+
<define-regex id="variable">[a-zA-Z_][a-zA-Z0-9_]*</define-regex>
|
416
|
+
|
417
|
+
<context id="methods" style-ref="method" extend-parent="false">
|
418
|
+
<match>\%{variable}[!?]?</match>
|
419
|
+
</context>
|
420
|
+
|
421
|
+
<context id="global-variables" style-ref="global-variable">
|
422
|
+
<match>\$\%{variable}</match>
|
423
|
+
</context>
|
424
|
+
|
425
|
+
<context id="class-variables" style-ref="class-variable">
|
426
|
+
<match>@@\%{variable}</match>
|
427
|
+
</context>
|
428
|
+
|
429
|
+
<context id="instance-variables" style-ref="instance-variable">
|
430
|
+
<match>@\%{variable}</match>
|
431
|
+
</context>
|
432
|
+
|
433
|
+
<context id="constants" style-ref="constant">
|
434
|
+
<match>\b[A-Z][A-Za-z0-9_]*\b</match>
|
435
|
+
</context>
|
436
|
+
|
437
|
+
<define-regex id="n">\d(_?\d)*</define-regex>
|
438
|
+
<define-regex id="n_pre">(?<!\w)</define-regex>
|
439
|
+
<define-regex id="n_suf">(?!\w)</define-regex>
|
440
|
+
|
441
|
+
<context id="float" style-ref="float">
|
442
|
+
<match>\%{n_pre}(\%{n}\.\%{n}|\%{n}(\.\%{n})?[eE][+-]?\%{n})\%{n_suf}</match>
|
443
|
+
</context>
|
444
|
+
|
445
|
+
<context id="integer" style-ref="integer">
|
446
|
+
<match>\%{n_pre}([1-9](_?[0-9])*|0)\%{n_suf}</match>
|
447
|
+
</context>
|
448
|
+
|
449
|
+
<context id="hex" style-ref="base-n-integer">
|
450
|
+
<match>\%{n_pre}0[xX][0-9A-Fa-f](_?[0-9A-Fa-f])*\%{n_suf}</match>
|
451
|
+
</context>
|
452
|
+
|
453
|
+
<context id="octal" style-ref="base-n-integer">
|
454
|
+
<match>\%{n_pre}0[0-7](_?[0-7])*\%{n_suf}</match>
|
455
|
+
</context>
|
456
|
+
|
457
|
+
<context id="binary" style-ref="base-n-integer">
|
458
|
+
<match>\%{n_pre}0[bB][01](_?[01])*\%{n_suf}</match>
|
459
|
+
</context>
|
460
|
+
|
461
|
+
<context id="special-values">
|
462
|
+
<include>
|
463
|
+
<context id="self" style-ref="self">
|
464
|
+
<keyword>self</keyword>
|
465
|
+
</context>
|
466
|
+
|
467
|
+
<context id="false" style-ref="false">
|
468
|
+
<keyword>false</keyword>
|
469
|
+
</context>
|
470
|
+
|
471
|
+
<context id="true" style-ref="true">
|
472
|
+
<keyword>true</keyword>
|
473
|
+
</context>
|
474
|
+
|
475
|
+
<context id="nil" style-ref="nil">
|
476
|
+
<keyword>nil</keyword>
|
477
|
+
</context>
|
478
|
+
|
479
|
+
<context id="special-values-words" style-ref="special-value">
|
480
|
+
<keyword>__ENCODING__</keyword>
|
481
|
+
<keyword>__FILE__</keyword>
|
482
|
+
<keyword>__LINE__</keyword>
|
483
|
+
</context>
|
484
|
+
</include>
|
485
|
+
</context>
|
486
|
+
|
487
|
+
<context id="block-parameters">
|
488
|
+
<start>(?<=do|\{)\s*(\|)</start>
|
489
|
+
<end>\|</end>
|
490
|
+
<include>
|
491
|
+
<context sub-pattern="1" where="start" style-ref="syntax-char"/>
|
492
|
+
<context sub-pattern="0" where="end" style-ref="syntax-char"/>
|
493
|
+
|
494
|
+
<context ref="important-constants"/>
|
495
|
+
<context ref="constants"/>
|
496
|
+
|
497
|
+
<context ref="special-variables"/>
|
498
|
+
<context ref="global-variables"/>
|
499
|
+
<context ref="methods"/>
|
500
|
+
|
501
|
+
<context ref="class-variables"/>
|
502
|
+
<context ref="instance-variables"/>
|
503
|
+
</include>
|
504
|
+
</context>
|
505
|
+
|
506
|
+
<context id="question-mark-string" style-ref="character">
|
507
|
+
<match>(?<![\w\.)\]}])\s*\?((\\[MC]-){1,2}|\\?)\S</match>
|
508
|
+
</context>
|
509
|
+
|
510
|
+
<context id="interpolation" style-ref="string-delimiter">
|
511
|
+
<start>#\{</start>
|
512
|
+
<end>\}</end>
|
513
|
+
<include>
|
514
|
+
<context ref="ruby:*"/>
|
515
|
+
</include>
|
516
|
+
</context>
|
517
|
+
|
518
|
+
<context id="variable-interpolation">
|
519
|
+
<start>(#)(?=[@$])</start>
|
520
|
+
<end>(?!\%{variable})</end>
|
521
|
+
<include>
|
522
|
+
<context where="start" sub-pattern="1" style-ref="string-delimiter"/>
|
523
|
+
<context ref="class-variables"/>
|
524
|
+
<context ref="instance-variables"/>
|
525
|
+
<context ref="special-variables"/>
|
526
|
+
<context ref="global-variables"/>
|
527
|
+
</include>
|
528
|
+
</context>
|
529
|
+
|
530
|
+
<context id="double-quoted">
|
531
|
+
<include>
|
532
|
+
<context ref="special-chars"/>
|
533
|
+
<context ref="interpolation"/>
|
534
|
+
<context ref="variable-interpolation"/>
|
535
|
+
</include>
|
536
|
+
</context>
|
537
|
+
|
538
|
+
<!-- ruby strings do not end at line end, so we cannot use def:string (parts lifted from perl.lang) -->
|
539
|
+
<!-- 'Hello world' -->
|
540
|
+
<context id="double-quoted-string" style-ref="string" class-disabled="no-spell-check" style-inside="true">
|
541
|
+
<start>"</start>
|
542
|
+
<end>"</end>
|
543
|
+
<include><context style-ref="special-char"><match>\\[\"\\]</match></context>
|
544
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
545
|
+
</context>
|
546
|
+
|
547
|
+
<!-- %Q{Hello world} %{Hello world} -->
|
548
|
+
<context id="double-quoted-string-curly" style-ref="string">
|
549
|
+
<start>%Q?\{</start>
|
550
|
+
<end>\}</end>
|
551
|
+
<include><context style-ref="special-char"><match>\\[}\\]</match></context>
|
552
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
553
|
+
</context>
|
554
|
+
|
555
|
+
<!-- %Q(Hello world) %(Hello world) -->
|
556
|
+
<context id="double-quoted-string-normal" style-ref="string">
|
557
|
+
<start>%Q?\(</start>
|
558
|
+
<end>\)</end>
|
559
|
+
<include><context style-ref="special-char"><match>\\[)\\]</match></context>
|
560
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
561
|
+
</context>
|
562
|
+
|
563
|
+
<!-- %Q[Hello world] %[Hello world] -->
|
564
|
+
<context id="double-quoted-string-square" style-ref="string">
|
565
|
+
<start>%Q?\[</start>
|
566
|
+
<end>\]</end>
|
567
|
+
<include><context style-ref="special-char"><match>\\[\]\\]</match></context>
|
568
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
569
|
+
</context>
|
570
|
+
|
571
|
+
<!-- %Q<Hello world> %<Hello world> -->
|
572
|
+
<context id="double-quoted-string-angle" style-ref="string">
|
573
|
+
<start>%Q?<</start>
|
574
|
+
<end>></end>
|
575
|
+
<include><context style-ref="special-char"><match>\\[>\\]</match></context>
|
576
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
577
|
+
</context>
|
578
|
+
|
579
|
+
<!-- %Q-Hello world- %-Hello world- %+hello world+ and so on... -->
|
580
|
+
<context id="double-quoted-string-generic" style-ref="string" extend-parent="false">
|
581
|
+
<start>%Q?([[:print:]])(?<![[:alnum:][:space:]])</start>
|
582
|
+
<end>\%{1@start}</end>
|
583
|
+
<include><!--context style-ref="special-char"><match>\\[\%{1@start}\\]</match></context-->
|
584
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
585
|
+
</context>
|
586
|
+
|
587
|
+
<!-- 'Hello world' -->
|
588
|
+
<context id="single-quoted-string" style-ref="string" class-disabled="no-spell-check">
|
589
|
+
<start>'</start>
|
590
|
+
<end>'</end>
|
591
|
+
<include><context style-ref="special-char"><match>\\['\\]</match></context>
|
592
|
+
<context where="start" sub-pattern="0" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
593
|
+
</context>
|
594
|
+
|
595
|
+
<!-- %q{Hello world} -->
|
596
|
+
<context id="single-quoted-string-curly" style-ref="string">
|
597
|
+
<start>%q\{</start>
|
598
|
+
<end>\}</end>
|
599
|
+
<include><context style-ref="special-char"><match>\\[}\\]</match></context>
|
600
|
+
<context where="start" sub-pattern="0" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
601
|
+
</context>
|
602
|
+
|
603
|
+
<!-- %q(Hello world) -->
|
604
|
+
<context id="single-quoted-string-normal" style-ref="string">
|
605
|
+
<start>%q\(</start>
|
606
|
+
<end>\)</end>
|
607
|
+
<include><context style-ref="special-char"><match>\\[)\\]</match></context>
|
608
|
+
<context where="start" sub-pattern="0" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
609
|
+
</context>
|
610
|
+
|
611
|
+
<!-- %q[Hello world] -->
|
612
|
+
<context id="single-quoted-string-square" style-ref="string">
|
613
|
+
<start>%q\[</start>
|
614
|
+
<end>\]</end>
|
615
|
+
<include><context style-ref="special-char"><match>\\[\]\\]</match></context>
|
616
|
+
<context where="start" sub-pattern="0" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
617
|
+
</context>
|
618
|
+
|
619
|
+
<!-- %q<Hello world> -->
|
620
|
+
<context id="single-quoted-string-angle" style-ref="string">
|
621
|
+
<start>%q<</start>
|
622
|
+
<end>></end>
|
623
|
+
<include><context style-ref="special-char"><match>\\[%gt;\\]</match></context>
|
624
|
+
<context where="start" sub-pattern="0" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
625
|
+
</context>
|
626
|
+
|
627
|
+
<!-- %q-Hello world- %q+Hello world+ %q*Hello world* and so on... -->
|
628
|
+
<context id="single-quoted-string-generic" style-ref="string">
|
629
|
+
<start>%q([[:print:]])(?<![[:alnum:]])</start>
|
630
|
+
<end>\%{1@start}</end>
|
631
|
+
<include><!--context style-ref="special-char"><match>\\[\%{1@start}\\]</match></context-->
|
632
|
+
<context where="start" sub-pattern="0" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
633
|
+
</context>
|
634
|
+
|
635
|
+
<!-- Arrays of strings
|
636
|
+
%W{Array of #{interpolated} strings} -->
|
637
|
+
<context id="double-quoted-word-array-curly" style-ref="string">
|
638
|
+
<start>%W\{</start>
|
639
|
+
<end>\}</end>
|
640
|
+
<include><context style-ref="special-char"><match>\\[}\\]</match></context>
|
641
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="collection"/><context where="end" sub-pattern="0" style-ref="collection"/></include>
|
642
|
+
</context>
|
643
|
+
|
644
|
+
<!-- %W(Array of #{interpolated} strings) -->
|
645
|
+
<context id="double-quoted-word-array-normal" style-ref="string">
|
646
|
+
<start>%W\(</start>
|
647
|
+
<end>\)</end>
|
648
|
+
<include><context style-ref="special-char"><match>\\[)\\]</match></context>
|
649
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="collection"/><context where="end" sub-pattern="0" style-ref="collection"/></include>
|
650
|
+
</context>
|
651
|
+
|
652
|
+
<!-- %W[Array of #{interpolated} strings] -->
|
653
|
+
<context id="double-quoted-word-array-square" style-ref="string">
|
654
|
+
<start>%W\[</start>
|
655
|
+
<end>\]</end>
|
656
|
+
<include><context style-ref="special-char"><match>\\[\]\\]</match></context>
|
657
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="collection"/><context where="end" sub-pattern="0" style-ref="collection"/></include>
|
658
|
+
</context>
|
659
|
+
|
660
|
+
<!-- %W<Array of #{interpolated} strings> -->
|
661
|
+
<context id="double-quoted-word-array-angle" style-ref="string">
|
662
|
+
<start>%W<</start>
|
663
|
+
<end>></end>
|
664
|
+
<include><context style-ref="special-char"><match>\\[>\\]</match></context>
|
665
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="collection"/><context where="end" sub-pattern="0" style-ref="collection"/></include>
|
666
|
+
</context>
|
667
|
+
|
668
|
+
<!-- %W-Array of #{interpolated} strings-
|
669
|
+
%W+Array of #{interpolated} strings+
|
670
|
+
%W*Array of #{interpolated} strings* and so on... -->
|
671
|
+
<context id="double-quoted-word-array-generic" style-ref="string">
|
672
|
+
<start>%W([[:print:]])(?<![[:alnum:]])</start>
|
673
|
+
<end>\%{1@start}</end>
|
674
|
+
<include><!--context style-ref="special-char"><match>\\[\%{1@start}\\]</match></context-->
|
675
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="collection"/><context where="end" sub-pattern="0" style-ref="collection"/></include>
|
676
|
+
</context>
|
677
|
+
|
678
|
+
<!-- %w{Array of strings} -->
|
679
|
+
<context id="single-quoted-word-array-curly" style-ref="string">
|
680
|
+
<start>%w\{</start>
|
681
|
+
<end>\}</end>
|
682
|
+
<include><context style-ref="special-char"><match>\\[}\\]</match></context>
|
683
|
+
<context where="start" sub-pattern="0" style-ref="collection"/><context where="end" sub-pattern="0" style-ref="collection"/></include>
|
684
|
+
</context>
|
685
|
+
|
686
|
+
<!-- %w(Array of strings) -->
|
687
|
+
<context id="single-quoted-word-array-normal" style-ref="string">
|
688
|
+
<start>%w\(</start>
|
689
|
+
<end>\)</end>
|
690
|
+
<include><context style-ref="special-char"><match>\\[)\\]</match></context>
|
691
|
+
<context where="start" sub-pattern="0" style-ref="collection"/><context where="end" sub-pattern="0" style-ref="collection"/></include>
|
692
|
+
</context>
|
693
|
+
|
694
|
+
<!-- %w[Array of strings] -->
|
695
|
+
<context id="single-quoted-word-array-square" style-ref="string">
|
696
|
+
<start>%w\[</start>
|
697
|
+
<end>\]</end>
|
698
|
+
<include><context style-ref="special-char"><match>\\[\]\\]</match></context>
|
699
|
+
<context where="start" sub-pattern="0" style-ref="collection"/><context where="end" sub-pattern="0" style-ref="collection"/></include>
|
700
|
+
</context>
|
701
|
+
|
702
|
+
<!-- %w<Array of strings> -->
|
703
|
+
<context id="single-quoted-word-array-angle" style-ref="string">
|
704
|
+
<start>%w<</start>
|
705
|
+
<end>></end>
|
706
|
+
<include><context style-ref="special-char"><match>\\[>\\]</match></context>
|
707
|
+
<context where="start" sub-pattern="0" style-ref="collection"/><context where="end" sub-pattern="0" style-ref="collection"/></include>
|
708
|
+
</context>
|
709
|
+
|
710
|
+
<!-- %w-Array of strings- %w+Array of strings+ %w*Array of strings* and so on... -->
|
711
|
+
<context id="single-quoted-word-array-generic" style-ref="string">
|
712
|
+
<start>%w([[:print:]])(?<![[:alnum:]])</start>
|
713
|
+
<end>\%{1@start}</end>
|
714
|
+
<include><!--context style-ref="special-char"><match>\\[\%{1@start}\\]</match></context-->
|
715
|
+
<context where="start" sub-pattern="0" style-ref="collection"/><context where="end" sub-pattern="0" style-ref="collection"/></include>
|
716
|
+
</context>
|
717
|
+
|
718
|
+
<context id="backtick-quoted-string" style-ref="system">
|
719
|
+
<start>`</start>
|
720
|
+
<end>`</end>
|
721
|
+
<include><context style-ref="special-char"><match>\\[`\\]</match></context>
|
722
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="system-delimiter"/><context where="end" sub-pattern="0" style-ref="system-delimiter"/></include>
|
723
|
+
</context>
|
724
|
+
|
725
|
+
<context id="backtick-quoted-string-curly" style-ref="system">
|
726
|
+
<start>%x\{</start>
|
727
|
+
<end>\}</end>
|
728
|
+
<include><context style-ref="special-char"><match>\\[}\\]</match></context>
|
729
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="system-delimiter"/><context where="end" sub-pattern="0" style-ref="system-delimiter"/></include>
|
730
|
+
</context>
|
731
|
+
|
732
|
+
<context id="backtick-quoted-string-normal" style-ref="system">
|
733
|
+
<start>%x\(</start>
|
734
|
+
<end>\)</end>
|
735
|
+
<include><context style-ref="special-char"><match>\\[)\\]</match></context>
|
736
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="system-delimiter"/><context where="end" sub-pattern="0" style-ref="system-delimiter"/></include>
|
737
|
+
</context>
|
738
|
+
|
739
|
+
<context id="backtick-quoted-string-square" style-ref="system">
|
740
|
+
<start>%x\[</start>
|
741
|
+
<end>\]</end>
|
742
|
+
<include><context style-ref="special-char"><match>\\[\]\\]</match></context>
|
743
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="system-delimiter"/><context where="end" sub-pattern="0" style-ref="system-delimiter"/></include>
|
744
|
+
</context>
|
745
|
+
|
746
|
+
<context id="backtick-quoted-string-angle" style-ref="system">
|
747
|
+
<start>%x<</start>
|
748
|
+
<end>></end>
|
749
|
+
<include><context style-ref="special-char"><match>\\[>\\]</match></context>
|
750
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="system-delimiter"/><context where="end" sub-pattern="0" style-ref="system-delimiter"/></include>
|
751
|
+
</context>
|
752
|
+
|
753
|
+
<context id="backtick-quoted-string-generic" style-ref="system">
|
754
|
+
<start>%x([[:print:]])(?<![[:alnum:]])</start>
|
755
|
+
<end>\%{1@start}</end>
|
756
|
+
<include><!--context style-ref="special-char"><match>\\[\%{1@start}\\]</match></context-->
|
757
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="system-delimiter"/><context where="end" sub-pattern="0" style-ref="system-delimiter"/></include>
|
758
|
+
</context>
|
759
|
+
|
760
|
+
<define-regex id="start-heredoc">([^a-zA-Z0-9\s\]\)>}])\s*(<<)</define-regex>
|
761
|
+
|
762
|
+
<context id="heredoc-string" style-ref="string">
|
763
|
+
<start>\%{start-heredoc}((\w+))</start>
|
764
|
+
<end>^\%{4@start}$</end>
|
765
|
+
<include><context ref="double-quoted"/><context where="start" sub-pattern="1" style-ref="operator"/><context where="start" sub-pattern="2" style-ref="string-delimiter"/><context where="start" sub-pattern="3" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
766
|
+
</context>
|
767
|
+
|
768
|
+
<context id="heredoc-indented-string" style-ref="string">
|
769
|
+
<start>\%{start-heredoc}(-(\w+))</start>
|
770
|
+
<end>^\s*\%{4@start}$</end>
|
771
|
+
<include><context ref="double-quoted"/><context where="start" sub-pattern="1" style-ref="operator"/><context where="start" sub-pattern="2" style-ref="string-delimiter"/><context where="start" sub-pattern="3" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
772
|
+
</context>
|
773
|
+
|
774
|
+
<context id="heredoc-single-quoted-string" style-ref="string">
|
775
|
+
<start>\%{start-heredoc}('(\w+)')</start>
|
776
|
+
<end>^\%{4@start}$</end>
|
777
|
+
<include><context where="start" sub-pattern="1" style-ref="operator"/><context where="start" sub-pattern="2" style-ref="string-delimiter"/><context where="start" sub-pattern="3" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
778
|
+
</context>
|
779
|
+
|
780
|
+
<context id="heredoc-double-quoted-string" style-ref="string">
|
781
|
+
<start>\%{start-heredoc}("(\w+)")</start>
|
782
|
+
<end>^\%{4@start}$</end>
|
783
|
+
<include><context ref="double-quoted"/><context where="start" sub-pattern="1" style-ref="operator"/><context where="start" sub-pattern="2" style-ref="string-delimiter"/><context where="start" sub-pattern="3" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
784
|
+
</context>
|
785
|
+
|
786
|
+
<context id="heredoc-backtick-quoted-string" style-ref="system">
|
787
|
+
<start>\%{start-heredoc}(`(\w+)`)</start>
|
788
|
+
<end>^\%{4@start}$</end>
|
789
|
+
<include><context ref="double-quoted"/><context where="start" sub-pattern="1" style-ref="operator"/><context where="start" sub-pattern="2" style-ref="system-delimiter"/><context where="start" sub-pattern="3" style-ref="system-delimiter"/><context where="end" sub-pattern="0" style-ref="system-delimiter"/></include>
|
790
|
+
</context>
|
791
|
+
|
792
|
+
<context id="heredoc-single-quoted-indented-string" style-ref="string">
|
793
|
+
<start>\%{start-heredoc}(-'(\w+)')</start>
|
794
|
+
<end>^\s*\%{4@start}$</end>
|
795
|
+
<include><context where="start" sub-pattern="1" style-ref="operator"/><context where="start" sub-pattern="2" style-ref="string-delimiter"/><context where="start" sub-pattern="3" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
796
|
+
</context>
|
797
|
+
|
798
|
+
<context id="heredoc-double-quoted-indented-string" style-ref="string">
|
799
|
+
<start>\%{start-heredoc}(-"(\w+)")</start>
|
800
|
+
<end>^\s*\%{4@start}$</end>
|
801
|
+
<include><context where="start" sub-pattern="1" style-ref="operator"/><context where="start" sub-pattern="2" style-ref="string-delimiter"/><context where="start" sub-pattern="3" style-ref="string-delimiter"/><context where="end" sub-pattern="0" style-ref="string-delimiter"/></include>
|
802
|
+
</context>
|
803
|
+
|
804
|
+
<context id="heredoc-backtick-quoted-indented-string" style-ref="system">
|
805
|
+
<start>\%{start-heredoc}(-`(\w+)`)</start>
|
806
|
+
<end>^\s*\%{4@start}$</end>
|
807
|
+
<include><context where="start" sub-pattern="1" style-ref="operator"/><context where="start" sub-pattern="2" style-ref="system-delimiter"/><context where="start" sub-pattern="3" style-ref="system-delimiter"/><context where="end" sub-pattern="0" style-ref="system-delimiter"/></include>
|
808
|
+
</context>
|
809
|
+
|
810
|
+
<define-regex id="regex-options">([mixo]*[neus]?[mixo]*)</define-regex>
|
811
|
+
|
812
|
+
<context id="regex" style-ref="regex">
|
813
|
+
<start extended="true">
|
814
|
+
\/
|
815
|
+
(?=
|
816
|
+
([^/\\]*(\\.))*
|
817
|
+
[^/]*
|
818
|
+
\/\%{regex-options}
|
819
|
+
)</start>
|
820
|
+
<end>(\/)\%{regex-options}</end>
|
821
|
+
<include><context style-ref="special-char"><match>\\[/\\]</match></context>
|
822
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="regex-delimiter"/><context where="end" sub-pattern="1" style-ref="regex-delimiter"/><context where="end" sub-pattern="2" style-ref="regex-options"/></include>
|
823
|
+
</context>
|
824
|
+
|
825
|
+
<context id="regex-curly" style-ref="regex">
|
826
|
+
<start>%r\{</start>
|
827
|
+
<end>(\})%{regex-options}</end>
|
828
|
+
<include><context style-ref="special-char"><match>\\[/\\]</match></context>
|
829
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="regex-delimiter"/><context where="end" sub-pattern="1" style-ref="regex-delimiter"/><context where="end" sub-pattern="2" style-ref="regex-options"/></include>
|
830
|
+
</context>
|
831
|
+
|
832
|
+
<context id="regex-normal" style-ref="regex">
|
833
|
+
<start>%r\(</start>
|
834
|
+
<end>(\))%{regex-options}</end>
|
835
|
+
<include><context style-ref="special-char"><match>\\[)\\]</match></context>
|
836
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="regex-delimiter"/><context where="end" sub-pattern="1" style-ref="regex-delimiter"/><context where="end" sub-pattern="2" style-ref="regex-options"/></include>
|
837
|
+
</context>
|
838
|
+
|
839
|
+
<context id="regex-square" style-ref="regex">
|
840
|
+
<start>%r\[</start>
|
841
|
+
<end>(\])%{regex-options}</end>
|
842
|
+
<include><context style-ref="special-char"><match>\\[\]\\]</match></context>
|
843
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="regex-delimiter"/><context where="end" sub-pattern="1" style-ref="regex-delimiter"/><context where="end" sub-pattern="2" style-ref="regex-options"/></include>
|
844
|
+
</context>
|
845
|
+
|
846
|
+
<context id="regex-angle" style-ref="regex">
|
847
|
+
<start>%r<</start>
|
848
|
+
<end>(>)\%{regex-options}</end>
|
849
|
+
<include><context style-ref="special-char"><match>\\[>\\]</match></context>
|
850
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="regex-delimiter"/><context where="end" sub-pattern="1" style-ref="regex-delimiter"/><context where="end" sub-pattern="2" style-ref="regex-options"/></include>
|
851
|
+
</context>
|
852
|
+
|
853
|
+
<context id="regex-generic" style-ref="regex">
|
854
|
+
<start>%r([[:print:]])(?<![[:alnum:]])</start>
|
855
|
+
<end>(\%{1@start})\%{regex-options}</end>
|
856
|
+
<include><!--context style-ref="special-char"><match>\\[\%{1@start}\\]</match></context-->
|
857
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="regex-delimiter"/><context where="end" sub-pattern="1" style-ref="regex-delimiter"/><context where="end" sub-pattern="2" style-ref="regex-options"/></include>
|
858
|
+
</context>
|
859
|
+
|
860
|
+
<context id="symbols" style-ref="symbol">
|
861
|
+
<start extended="true">
|
862
|
+
(?<!:)(:)(
|
863
|
+
\$ \%{special-variables-1-char}
|
864
|
+
| \$ \%{special-variables-2-chars}
|
865
|
+
| [a-zA-Z_$] [a-zA-Z0-9_]* [?!=]?
|
866
|
+
| <=> | <= | >= | != | [!=]~ | ={2,3} | \[\]=?
|
867
|
+
| [<>!*+~]
|
868
|
+
)
|
869
|
+
</start>
|
870
|
+
<end></end>
|
871
|
+
<include>
|
872
|
+
<context where="start" sub-pattern="1" style-ref="symbol-delimiter"/>
|
873
|
+
</include>
|
874
|
+
</context>
|
875
|
+
|
876
|
+
<context id="symbols-single-quoted" style-ref="symbol">
|
877
|
+
<start>:'</start>
|
878
|
+
<end>'</end>
|
879
|
+
<include><context style-ref="special-char"><match>\\[\'\\]</match></context>
|
880
|
+
<context where="start" sub-pattern="0" style-ref="symbol-delimiter"/><context where="end" sub-pattern="0" style-ref="symbol-delimiter"/></include>
|
881
|
+
</context>
|
882
|
+
|
883
|
+
<context id="symbols-double-quoted" style-ref="symbol">
|
884
|
+
<start>:"</start>
|
885
|
+
<end>"</end>
|
886
|
+
<include><context style-ref="special-char"><match>\\[\"\\]</match></context>
|
887
|
+
<context ref="double-quoted"/><context where="start" sub-pattern="0" style-ref="symbol-delimiter"/><context where="end" sub-pattern="0" style-ref="symbol-delimiter"/></include>
|
888
|
+
</context>
|
889
|
+
|
890
|
+
<context id="function">
|
891
|
+
<start>(?<![\w\.])(?=def)\b(def)\b</start>
|
892
|
+
<end>([^.]+?)(?=[\s(;]|$)</end>
|
893
|
+
<include>
|
894
|
+
<context where="start" sub-pattern="0" style-ref="keyword"/>
|
895
|
+
<context where="end" sub-pattern="1" style-ref="function"/>
|
896
|
+
<context ref="ruby:*"/>
|
897
|
+
</include>
|
898
|
+
</context>
|
899
|
+
|
900
|
+
<context id="operators" style-ref="operator" extend-parent="false">
|
901
|
+
<match><=>|(?<!%)=(?!>)|~|<|&|(?<!=)>|\.|::|\*|/|\+|-|\||!|not|and|or|defined\?|\?|:</match>
|
902
|
+
</context>
|
903
|
+
|
904
|
+
<context id="syntax-chars" style-ref="syntax-char" extend-parent="false">
|
905
|
+
<match>[\\;]</match>
|
906
|
+
</context>
|
907
|
+
|
908
|
+
<context id="brackets">
|
909
|
+
<include>
|
910
|
+
<context id="normal-brackets" style-ref="syntax-char">
|
911
|
+
<start>\(</start><end>\)</end>
|
912
|
+
<include><context ref="ruby:*"/></include>
|
913
|
+
</context>
|
914
|
+
<context id="square-brackets" style-ref="syntax-char">
|
915
|
+
<start>\[</start><end>\]</end>
|
916
|
+
<include><context ref="ruby:*"/></include>
|
917
|
+
</context>
|
918
|
+
<context id="curly-brackets" style-ref="syntax-char">
|
919
|
+
<start>(?<=[\])\w])\s*\{</start><end>\}</end>
|
920
|
+
<include><context ref="ruby:*"/></include>
|
921
|
+
</context>
|
922
|
+
</include>
|
923
|
+
</context>
|
924
|
+
|
925
|
+
<context id="hash-symbols" style-ref="symbol">
|
926
|
+
<match>[a-zA-Z0-9_]+(!|\?)?:(?!:)</match>
|
927
|
+
</context>
|
928
|
+
|
929
|
+
<context id="hash-strings" style-ref="string">
|
930
|
+
<match>(?<!\s)\:(?!:)</match>
|
931
|
+
</context>
|
932
|
+
|
933
|
+
<context id="hash" extend-parent="false">
|
934
|
+
<start>(?<![\])\w])\s*\{</start>
|
935
|
+
<end>\}</end>
|
936
|
+
<include>
|
937
|
+
<context where="start" sub-pattern="0" style-ref="collection"/>
|
938
|
+
<context where="end" sub-pattern="0" style-ref="collection"/>
|
939
|
+
<context ref="hash-symbols"/>
|
940
|
+
<context ref="hash-strings"/>
|
941
|
+
<context ref="ruby:*"/>
|
942
|
+
</include>
|
943
|
+
</context>
|
944
|
+
|
945
|
+
<context id="collection-chars" style-ref="collection">
|
946
|
+
<match>(=>|,)</match>
|
947
|
+
</context>
|
948
|
+
|
949
|
+
<context id="array">
|
950
|
+
<start>(?<![\])}\w])\[</start>
|
951
|
+
<end>\]</end>
|
952
|
+
<include>
|
953
|
+
<context where="start" sub-pattern="0" style-ref="collection"/>
|
954
|
+
<context where="end" sub-pattern="0" style-ref="collection"/>
|
955
|
+
<context ref="ruby:*"/>
|
956
|
+
</include>
|
957
|
+
</context>
|
958
|
+
|
959
|
+
<context id="data" style-ref="string">
|
960
|
+
<start>__END__</start>
|
961
|
+
<include>
|
962
|
+
<context where="start" sub-pattern="0" style-ref="string-delimiter"/>
|
963
|
+
</include>
|
964
|
+
</context>
|
965
|
+
|
966
|
+
<context id="errors" style-ref="error" extend-parent="false">
|
967
|
+
<match extended="true">
|
968
|
+
[}\])]
|
969
|
+
</match>
|
970
|
+
</context>
|
971
|
+
|
972
|
+
<context id="ruby" class="no-spell-check">
|
973
|
+
<include>
|
974
|
+
<context ref="def:shebang"/>
|
975
|
+
<context ref="encoding-comment"/>
|
976
|
+
<context ref="shell-like-comment"/><!-- not from def -->
|
977
|
+
<context ref="multiline-comment"/>
|
978
|
+
<context ref="data"/>
|
979
|
+
|
980
|
+
<context ref="heredoc-string"/>
|
981
|
+
<context ref="heredoc-single-quoted-string"/>
|
982
|
+
<context ref="heredoc-double-quoted-string"/>
|
983
|
+
<context ref="heredoc-backtick-quoted-string"/>
|
984
|
+
<context ref="heredoc-indented-string"/>
|
985
|
+
<context ref="heredoc-single-quoted-indented-string"/>
|
986
|
+
<context ref="heredoc-double-quoted-indented-string"/>
|
987
|
+
<context ref="heredoc-backtick-quoted-indented-string"/>
|
988
|
+
|
989
|
+
<context ref="symbols"/>
|
990
|
+
<context ref="symbols-single-quoted"/>
|
991
|
+
<context ref="symbols-double-quoted"/>
|
992
|
+
|
993
|
+
<context ref="question-mark-string"/>
|
994
|
+
|
995
|
+
<context ref="double-quoted-string"/>
|
996
|
+
<context ref="double-quoted-string-curly"/>
|
997
|
+
<context ref="double-quoted-string-normal"/>
|
998
|
+
<context ref="double-quoted-string-square"/>
|
999
|
+
<context ref="double-quoted-string-angle"/>
|
1000
|
+
<context ref="double-quoted-string-generic"/>
|
1001
|
+
<context ref="single-quoted-string"/>
|
1002
|
+
<context ref="single-quoted-string-curly"/>
|
1003
|
+
<context ref="single-quoted-string-normal"/>
|
1004
|
+
<context ref="single-quoted-string-square"/>
|
1005
|
+
<context ref="single-quoted-string-angle"/>
|
1006
|
+
<context ref="single-quoted-string-generic"/>
|
1007
|
+
|
1008
|
+
<context ref="double-quoted-word-array-curly"/>
|
1009
|
+
<context ref="double-quoted-word-array-normal"/>
|
1010
|
+
<context ref="double-quoted-word-array-square"/>
|
1011
|
+
<context ref="double-quoted-word-array-angle"/>
|
1012
|
+
<context ref="double-quoted-word-array-generic"/>
|
1013
|
+
<context ref="single-quoted-word-array-curly"/>
|
1014
|
+
<context ref="single-quoted-word-array-normal"/>
|
1015
|
+
<context ref="single-quoted-word-array-square"/>
|
1016
|
+
<context ref="single-quoted-word-array-angle"/>
|
1017
|
+
<context ref="single-quoted-word-array-generic"/>
|
1018
|
+
|
1019
|
+
<context ref="backtick-quoted-string"/>
|
1020
|
+
<context ref="backtick-quoted-string-curly"/>
|
1021
|
+
<context ref="backtick-quoted-string-normal"/>
|
1022
|
+
<context ref="backtick-quoted-string-square"/>
|
1023
|
+
<context ref="backtick-quoted-string-angle"/>
|
1024
|
+
<context ref="backtick-quoted-string-generic"/>
|
1025
|
+
|
1026
|
+
<context ref="regex"/>
|
1027
|
+
<context ref="regex-curly"/>
|
1028
|
+
<context ref="regex-normal"/>
|
1029
|
+
<context ref="regex-square"/>
|
1030
|
+
<context ref="regex-angle"/>
|
1031
|
+
<context ref="regex-generic"/>
|
1032
|
+
|
1033
|
+
<context ref="function"/>
|
1034
|
+
|
1035
|
+
<context ref="keywords"/>
|
1036
|
+
<context ref="special-values"/>
|
1037
|
+
<context ref="important-methods"/>
|
1038
|
+
|
1039
|
+
<context ref="important-constants"/>
|
1040
|
+
<context ref="constants"/>
|
1041
|
+
|
1042
|
+
<context ref="special-variables"/>
|
1043
|
+
<context ref="global-variables"/>
|
1044
|
+
<context ref="methods"/>
|
1045
|
+
|
1046
|
+
<context ref="class-variables"/>
|
1047
|
+
<context ref="instance-variables"/>
|
1048
|
+
|
1049
|
+
<context ref="float"/>
|
1050
|
+
<context ref="integer"/>
|
1051
|
+
<context ref="hex"/>
|
1052
|
+
<context ref="octal"/>
|
1053
|
+
<context ref="binary"/>
|
1054
|
+
|
1055
|
+
<context ref="block-parameters"/>
|
1056
|
+
<context ref="hash"/>
|
1057
|
+
<context ref="array"/>
|
1058
|
+
|
1059
|
+
<context ref="collection-chars"/>
|
1060
|
+
<context ref="operators"/>
|
1061
|
+
<context ref="syntax-chars"/>
|
1062
|
+
<context ref="brackets"/>
|
1063
|
+
<context ref="errors"/>
|
1064
|
+
</include>
|
1065
|
+
</context>
|
1066
|
+
</definitions>
|
1067
|
+
</language>
|
1068
|
+
|