PageRenderTime 18ms CodeModel.GetById 11ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-2-pre4/modes/ruby.xml

#
XML | 143 lines | 139 code | 2 blank | 2 comment | 0 complexity | bb95802022955a008aa38879ce175d20 MD5 | raw file
  1<?xml version="1.0"?>
  2
  3<!DOCTYPE MODE SYSTEM "xmode.dtd">
  4
  5<!-- Ruby mode by Ian Maclean -->
  6<!-- tweakage by Chris Morris - clabs.org -->
  7<MODE>
  8	<PROPS>
  9		<PROPERTY NAME="indentOpenBrackets" VALUE="{" />
 10		<PROPERTY NAME="indentCloseBrackets" VALUE="}" />
 11		<PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
 12		<PROPERTY NAME="commentStart" VALUE="=begin" />
 13		<PROPERTY NAME="commentEnd" VALUE="=end" />
 14		<PROPERTY NAME="lineComment" VALUE="#" />
 15	</PROPS>
 16	<RULES ESCAPE="\" IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
 17		<!-- Ruby comment (Inline Documetation ) -->
 18		<SPAN TYPE="COMMENT2">
 19			<BEGIN>=begin</BEGIN>
 20			<END>=end</END>
 21		</SPAN>
 22
 23    <SPAN TYPE="LITERAL2" EXCLUDE_MATCH="TRUE">
 24      <BEGIN>#{</BEGIN>
 25      <END>}</END>
 26    </SPAN>
 27    
 28		<SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="doubleQuoteLiteral">
 29			<BEGIN>"</BEGIN>
 30			<END>"</END>
 31		</SPAN>
 32		<SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
 33			<BEGIN>'</BEGIN>
 34			<END>'</END>
 35		</SPAN>
 36
 37		<!-- Std Comment   -->
 38		<EOL_SPAN TYPE="COMMENT1">#</EOL_SPAN>
 39
 40		<!-- Not Operators but like the syntak hightligh to match operators -->
 41		<SEQ TYPE="OPERATOR">{</SEQ>
 42		<SEQ TYPE="OPERATOR">}</SEQ>
 43		<SEQ TYPE="OPERATOR">(</SEQ>
 44		<SEQ TYPE="OPERATOR">)</SEQ>
 45
 46		<!-- Arithmetic operators -->
 47		<SEQ TYPE="OPERATOR">::</SEQ>
 48		<SEQ TYPE="OPERATOR">===</SEQ>
 49		<SEQ TYPE="OPERATOR">=</SEQ>
 50		<SEQ TYPE="OPERATOR">&gt;&gt;</SEQ>
 51		<SEQ TYPE="OPERATOR">&lt;&lt;</SEQ>
 52		<SEQ TYPE="OPERATOR">&lt;=</SEQ>
 53		<SEQ TYPE="OPERATOR">+</SEQ>
 54		<SEQ TYPE="OPERATOR">-</SEQ>
 55		<SEQ TYPE="OPERATOR">/</SEQ>
 56
 57		<SEQ TYPE="OPERATOR">**</SEQ>
 58		<SEQ TYPE="OPERATOR">*</SEQ>
 59
 60		<SEQ TYPE="OPERATOR">%</SEQ>
 61
 62		<!-- Logical Operators -->
 63		<SEQ TYPE="OPERATOR">&amp;</SEQ>
 64		<SEQ TYPE="OPERATOR">|</SEQ>
 65		<SEQ TYPE="OPERATOR">!</SEQ>
 66		<SEQ TYPE="OPERATOR">&gt;</SEQ>
 67		<SEQ TYPE="OPERATOR">&lt;</SEQ>
 68		<SEQ TYPE="OPERATOR">^</SEQ>
 69		<SEQ TYPE="OPERATOR">~</SEQ>
 70
 71		<!--Range operators -->
 72		<SEQ TYPE="OPERATOR">...</SEQ>
 73		<SEQ TYPE="OPERATOR">..</SEQ>
 74
 75		<SEQ TYPE="OPERATOR">]</SEQ>
 76		<SEQ TYPE="OPERATOR">[</SEQ>
 77		<SEQ TYPE="OPERATOR">?</SEQ>
 78		<MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
 79			EXCLUDE_MATCH="TRUE"
 80			TYPE="LABEL">:</MARK_PREVIOUS>
 81		<SEQ TYPE="OPERATOR">:</SEQ>
 82
 83		<KEYWORDS>
 84			<KEYWORD1>BEGIN</KEYWORD1>
 85			<KEYWORD1>END</KEYWORD1>
 86			<KEYWORD1>alias</KEYWORD1>
 87			<KEYWORD1>and</KEYWORD1>
 88			<KEYWORD1>begin</KEYWORD1>
 89			<KEYWORD1>break</KEYWORD1>
 90			<KEYWORD1>case</KEYWORD1>
 91			<KEYWORD1>class</KEYWORD1>
 92			<KEYWORD1>def</KEYWORD1>
 93			<KEYWORD1>defined</KEYWORD1>
 94			<KEYWORD1>do</KEYWORD1>
 95			<KEYWORD1>else</KEYWORD1>
 96			<KEYWORD1>elsif</KEYWORD1>
 97			<KEYWORD1>end</KEYWORD1>
 98			<KEYWORD1>ensure</KEYWORD1>
 99			<KEYWORD1>for</KEYWORD1>
100			<KEYWORD1>if</KEYWORD1>
101			<KEYWORD1>in</KEYWORD1>
102			<KEYWORD1>module</KEYWORD1>
103			<KEYWORD1>next</KEYWORD1>
104			<KEYWORD1>elsif</KEYWORD1>
105			<KEYWORD1>nil</KEYWORD1>
106			<KEYWORD1>or</KEYWORD1>
107			<KEYWORD1>redo</KEYWORD1>
108			<KEYWORD1>rescue</KEYWORD1>
109			<KEYWORD1>retry</KEYWORD1>
110			<KEYWORD1>return</KEYWORD1>
111			<KEYWORD1>then</KEYWORD1>
112			<KEYWORD1>undef</KEYWORD1>
113			<KEYWORD1>unless</KEYWORD1>
114			<KEYWORD1>until</KEYWORD1>
115			<KEYWORD1>when</KEYWORD1>
116			<KEYWORD1>while</KEYWORD1>
117			<KEYWORD1>yield</KEYWORD1>
118
119			<!--   Keyword 2's -->
120			<KEYWORD2>require</KEYWORD2>
121			<KEYWORD2>include</KEYWORD2>
122
123			<!--
124			<KEYWORD3>short</KEYWORD3>
125			<KEYWORD3>void</KEYWORD3>  -->
126
127			<OPERATOR>not</OPERATOR>
128
129			<LITERAL2>super</LITERAL2>
130			<LITERAL2>self</LITERAL2>
131			<LITERAL2>false</LITERAL2>
132			<LITERAL2>true</LITERAL2>
133			<LITERAL2>__FILE__</LITERAL2>
134			<LITERAL2>__LINE__</LITERAL2>
135		</KEYWORDS>
136	</RULES>
137  <RULES SET="doubleQuoteLiteral">
138    <SPAN TYPE="LITERAL2" EXCLUDE_MATCH="TRUE">
139      <BEGIN>#{</BEGIN>
140      <END>}</END>
141    </SPAN>
142  </RULES>
143</MODE>