PageRenderTime 33ms CodeModel.GetById 27ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/jEdit/tags/jedit-4-1-pre5/modes/ruby.xml

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