187 lines
6.1 KiB
XML
187 lines
6.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<language id="ruby" _name="Ruby" version="2.0" _section="Scripts">
|
|
<metadata>
|
|
<property name="mimetypes">application/x-ruby;text/x-ruby</property>
|
|
<property name="globs">*.rb</property>
|
|
<property name="line-comment-start">#</property>
|
|
</metadata>
|
|
|
|
<styles>
|
|
<style id="comment" _name="Comment" map-to="def:comment"/>
|
|
<style id="string" _name="String" map-to="def:string"/>
|
|
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
|
<style id="decimal" _name="Decimal" map-to="def:decimal"/>
|
|
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
|
|
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
|
|
<style id="others" _name="Others"/>
|
|
</styles>
|
|
|
|
<definitions>
|
|
<context id="attribute-definitions" style-ref="others">
|
|
<keyword>attr</keyword>
|
|
<keyword>attr_writer</keyword>
|
|
<keyword>attr_reader</keyword>
|
|
<keyword>attr_accessor</keyword>
|
|
</context>
|
|
<context id="definitions" style-ref="keyword">
|
|
<keyword>alias</keyword>
|
|
<keyword>class</keyword>
|
|
<keyword>module</keyword>
|
|
<keyword>def</keyword>
|
|
<keyword>undef</keyword>
|
|
</context>
|
|
<context id="pseudo-variables" style-ref="data-type">
|
|
<keyword>self</keyword>
|
|
<keyword>super</keyword>
|
|
<keyword>nil</keyword>
|
|
<keyword>false</keyword>
|
|
<keyword>true</keyword>
|
|
<keyword>__FILE__</keyword>
|
|
<keyword>__LINE__</keyword>
|
|
</context>
|
|
<context id="module-handlers" style-ref="preprocessor">
|
|
<keyword>require</keyword>
|
|
<keyword>include</keyword>
|
|
<keyword>load</keyword>
|
|
</context>
|
|
<context id="keywords" style-ref="keyword">
|
|
<keyword>BEGIN</keyword>
|
|
<keyword>END</keyword>
|
|
<keyword>and</keyword>
|
|
<keyword>begin</keyword>
|
|
<keyword>break</keyword>
|
|
<keyword>case</keyword>
|
|
<keyword>catch</keyword>
|
|
<keyword>defined?</keyword>
|
|
<keyword>do</keyword>
|
|
<keyword>else</keyword>
|
|
<keyword>elsif</keyword>
|
|
<keyword>end</keyword>
|
|
<keyword>ensure</keyword>
|
|
<keyword>for</keyword>
|
|
<keyword>if</keyword>
|
|
<keyword>in</keyword>
|
|
<keyword>next</keyword>
|
|
<keyword>not</keyword>
|
|
<keyword>or</keyword>
|
|
<keyword>private</keyword>
|
|
<keyword>protected</keyword>
|
|
<keyword>public</keyword>
|
|
<keyword>redo</keyword>
|
|
<keyword>rescue</keyword>
|
|
<keyword>retry</keyword>
|
|
<keyword>return</keyword>
|
|
<keyword>then</keyword>
|
|
<keyword>throw</keyword>
|
|
<keyword>unless</keyword>
|
|
<keyword>until</keyword>
|
|
<keyword>when</keyword>
|
|
<keyword>while</keyword>
|
|
<keyword>yield</keyword>
|
|
</context>
|
|
<context id="builtins" style-ref="others">
|
|
<keyword>Array</keyword>
|
|
<keyword>Bignum</keyword>
|
|
<keyword>Binding</keyword>
|
|
<keyword>Class</keyword>
|
|
<keyword>Continuation</keyword>
|
|
<keyword>Dir</keyword>
|
|
<keyword>Exception</keyword>
|
|
<keyword>FalseClass</keyword>
|
|
<keyword>File::Stat</keyword>
|
|
<keyword>File</keyword>
|
|
<keyword>Fixnum</keyword>
|
|
<keyword>Fload</keyword>
|
|
<keyword>Hash</keyword>
|
|
<keyword>Integer</keyword>
|
|
<keyword>IO</keyword>
|
|
<keyword>MatchData</keyword>
|
|
<keyword>Method</keyword>
|
|
<keyword>Module</keyword>
|
|
<keyword>NilClass</keyword>
|
|
<keyword>Numeric</keyword>
|
|
<keyword>Object</keyword>
|
|
<keyword>Proc</keyword>
|
|
<keyword>Range</keyword>
|
|
<keyword>Regexp</keyword>
|
|
<keyword>String</keyword>
|
|
<keyword>Struct::Tms</keyword>
|
|
<keyword>Symbol</keyword>
|
|
<keyword>Symbol</keyword>
|
|
<keyword>ThreadGroup</keyword>
|
|
<keyword>Thread</keyword>
|
|
<keyword>Time</keyword>
|
|
<keyword>TrueClass</keyword>
|
|
</context>
|
|
<context id="class-variables" style-ref="data-type">
|
|
<match>@@[a-zA-Z_][a-zA-Z0-9_]*</match>
|
|
</context>
|
|
<context id="instance-variables" style-ref="data-type">
|
|
<match>@[a-zA-Z_][a-zA-Z0-9_]*</match>
|
|
</context>
|
|
<context id="global-variables" style-ref="data-type">
|
|
<match>\$[a-zA-Z_][a-zA-Z0-9_]*</match>
|
|
</context>
|
|
<context id="symbols" style-ref="data-type">
|
|
<match>:[a-zA-Z0-9_]+</match>
|
|
</context>
|
|
<context id="regexp-variables" style-ref="decimal">
|
|
<match>\$[1-9][0-9]*</match>
|
|
</context>
|
|
<context id="constants" style-ref="decimal">
|
|
<match>\b[A-Z_][A-Za-z0-9_:]*\b</match>
|
|
</context>
|
|
<context id="double-quoted-string" style-ref="string" end-at-line-end="true">
|
|
<start>"</start>
|
|
<end>"</end>
|
|
<include>
|
|
<context ref="def:escape"/>
|
|
<context ref="def:line-continue"/>
|
|
</include>
|
|
</context>
|
|
<context id="single-quoted-string" style-ref="string" end-at-line-end="true">
|
|
<start>'</start>
|
|
<end>'</end>
|
|
<include>
|
|
<context ref="def:escape"/>
|
|
<context ref="def:line-continue"/>
|
|
</include>
|
|
</context>
|
|
<context id="line-comment" style-ref="comment" end-at-line-end="true">
|
|
<start>#</start>
|
|
<include>
|
|
<context ref="def:escape"/>
|
|
<context ref="def:line-continue"/>
|
|
</include>
|
|
</context>
|
|
<context id="multiline-comment" style-ref="comment">
|
|
<start>^=begin</start>
|
|
<end>^=end</end>
|
|
<include>
|
|
<context ref="def:escape"/>
|
|
<context ref="def:line-continue"/>
|
|
</include>
|
|
</context>
|
|
<context id="ruby">
|
|
<include>
|
|
<context ref="attribute-definitions"/>
|
|
<context ref="definitions"/>
|
|
<context ref="pseudo-variables"/>
|
|
<context ref="module-handlers"/>
|
|
<context ref="keywords"/>
|
|
<context ref="builtins"/>
|
|
<context ref="class-variables"/>
|
|
<context ref="instance-variables"/>
|
|
<context ref="global-variables"/>
|
|
<context ref="symbols"/>
|
|
<context ref="regexp-variables"/>
|
|
<context ref="constants"/>
|
|
<context ref="double-quoted-string"/>
|
|
<context ref="single-quoted-string"/>
|
|
<context ref="line-comment"/>
|
|
<context ref="multiline-comment"/>
|
|
</include>
|
|
</context>
|
|
</definitions>
|
|
</language>
|