summaryrefslogtreecommitdiff
path: root/share/tinykate/syntax/ruby.xml
Unidiff
Diffstat (limited to 'share/tinykate/syntax/ruby.xml') (more/less context) (show whitespace changes)
-rw-r--r--share/tinykate/syntax/ruby.xml152
1 files changed, 152 insertions, 0 deletions
diff --git a/share/tinykate/syntax/ruby.xml b/share/tinykate/syntax/ruby.xml
new file mode 100644
index 0000000..d7b6bfb
--- a/dev/null
+++ b/share/tinykate/syntax/ruby.xml
@@ -0,0 +1,152 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE language SYSTEM "language.dtd">
3<language name="Ruby" version="1.00" kateversion="2.0" section="Scripts" extensions="*.rb" mimetype="text/x-ruby">
4 <highlighting>
5
6 <list name = "keywords">
7 <item> __FILE__ </item>
8 <item> __LINE__ </item>
9 <item> BEGIN </item>
10 <item> END </item>
11 <item> and </item>
12 <item> begin </item>
13 <item> break </item>
14 <item> and </item>
15 <item> begin </item>
16 <item> break </item>
17 <item> case </item>
18 <item> catch </item>
19 <item> defined? </item>
20 <item> do </item>
21 <item> else </item>
22 <item> elsif </item>
23 <item> end </item>
24 <item> ensure </item>
25 <item> for </item>
26 <item> if </item>
27 <item> in </item>
28 <item> include </item>
29 <item> next </item>
30 <item> not </item>
31 <item> or </item>
32 <item> private </item>
33 <item> protected </item>
34 <item> public </item>
35 <item> redo </item>
36 <item> require </item>
37 <item> rescue </item>
38 <item> retry </item>
39 <item> return </item>
40 <item> super </item>
41 <item> then </item>
42 <item> throw </item>
43 <item> unless </item>
44 <item> until </item>
45 <item> when </item>
46 <item> while </item>
47 <item> yield </item>
48 </list>
49
50 <list name = "attribute-definitions">
51 <item> attr </item>
52 <item> attr_reader </item>
53 <item> attr_writer </item>
54 <item> attr_accessor </item>
55 </list>
56
57 <list name = "definitions">
58 <item> alias </item>
59 <item> module </item>
60 <item> class </item>
61 <item> def </item>
62 <item> undef </item>
63 </list>
64
65 <list name = "literals">
66 <item> nil </item>
67 <item> false </item>
68 <item> true </item>
69 </list>
70
71 <contexts>
72 <context name = "Normal" attribute = "Normal Text" lineEndContext="0">
73 <keyword String = "keywords" attribute = "Keyword" context="0"/>
74 <keyword String = "literals" attribute = "Literal" context="0"/>
75 <StringDetect String= "self" attribute = "Instance Variable" context="0" insensitive="FALSE"/>
76 <keyword String = "attribute-definitions" attribute = "Attribute Definition" context="0"/>
77 <!-- group>
78 <keyword String = "definitions" attribute = "Keyword" context="0"/>
79 <whitespace/>
80 <regexp match = "[a-zA-Z_0-9.]+" attribute = "Definition"/>
81 </group -->
82 <Float attribute = "Float" context="0"/>
83 <Int attribute = "Decimal" context="0"/>
84 <HlCChar attribute = "Char" context="0"/>
85 <DetectChar char = "." attribute = "Operator" context="0"/>
86 <StringDetect String = "&amp;&amp;" attribute = "Operator" context="0" insensitive="FALSE"/>
87 <RegExpr String = ":[^\s]+" attribute = "Symbol" context="0"/>
88 <RegExpr String = "/[^\s]+/" attribute = "Delimiter" context="0"/>
89 <StringDetect String = "||" attribute = "Operator" context="0" insensitive="FALSE"/>
90 <RegExpr String = "\s\?\s" attribute = "Operator" context="0"/>
91 <RegExpr String = "\s:\s" attribute = "Operator" context="0"/>
92 <RegExpr String = "[&lt;&gt;!^&#61;&#37;+*~/-]+" attribute = "Operator" context="0"/>
93 <DetectChar char = '"' attribute = "String" context = "2"/>
94 <DetectChar char= "'" attribute = "String" context="3"/>
95 <RegExpr String = "^##$" attribute = "Main Comment" context="1"/>
96 <RegExpr String = "^#$" attribute = "Comment" context="0"/>
97 <RegExpr String = "[\[\]\{\}|]+" attribute = "Delimiter" context="0"/>
98 <RegExpr String = "[A-Z_]+" attribute = "Global Constant" context="0"/>
99 <RegExpr String = "$[a-zA-Z_0-9]+" attribute = "Global Variable" context="0"/>
100 <RegExpr String = "@[a-zA-Z_0-9]+" attribute = "Instance Variable" context="0"/>
101 <RegExpr String = "@@[a-zA-Z_0-9]+" attribute = "Class Variable" context="0"/>
102 </context>
103
104 <context name = "Main Comment" attribute = "Main Comment" lineEndContext="0">
105 <RegExpr String = "^##$" attribute = "Main Comment" context = "0"/>
106 <RegExpr String = "^#$" attribute = "Main Comment" context = "0"/>
107 </context>
108
109 <context name = "Quoted String" attribute = "String" lineEndContext="0">
110 <RegExpr String = "#{[^}]+}" attribute = "Expression" context = "0"/>
111 <HlCChar attribute = "Char" context = "0"/>
112 <DetectChar char = '"' attribute = "String" context = "0"/>
113 </context>
114
115 <context name = "Apostrophed String" attribute = "String" lineEndContext="0">
116 <RegExpr String = "#{[^}]+}" attribute = "Expression" context = "0"/>
117 <HlCChar attribute = "Char" context = "0"/>
118 <DetectChar char = "'" attribute = "String" context = "0"/>
119 </context>
120
121
122 </contexts>
123
124 <itemDatas>
125 <itemData name = "Normal Text" defStyleNum ="dsNormal"/>
126 <itemData name = "Keyword" defStyleNum ="dsKeyword"/>
127 <itemData name = "Definition" defStyleNum ="dsNormal"/>
128 <itemData name = "Literal" defStyleNum ="dsDecVal"/>
129 <itemData name = "Decimal" defStyleNum ="dsDecVal"/>
130 <itemData name = "Float" defStyleNum ="dsFloat"/>
131 <itemData name = "Char" defStyleNum ="dsChar"/>
132 <itemData name = "Symbol" defStyleNum ="dsString"/>
133 <itemData name = "String" defStyleNum ="dsString"/>
134 <itemData name = "Main Comment" defStyleNum ="dsComment" />
135 <itemData name = "Comment" defStyleNum ="dsComment"/>
136 <itemData name = "Delimiter" defStyleNum ="dsChar"/>
137 <itemData name = "Global Constant" defStyleNum ="dsDecVal"/>
138 <itemData name = "Global Variable" defStyleNum ="dsOthers"/>
139 <itemData name = "Instance Variable" defStyleNum ="dsOthers"/>
140 <itemData name = "Class Variable" defStyleNum ="dsOthers"/>
141 <itemData name = "Expression" defStyleNum ="dsOthers"/>
142 <itemData name = "Operator" defStyleNum ="dsChar"/>
143 <itemData name = "Attribute Definition" defStyleNum ="dsOthers"/>
144 </itemDatas>
145 </highlighting>
146 <general>
147 <comments>
148 <comment name="singleLine" start="#" />
149 </comments>
150 <keywords casesensitive="1" />
151 </general>
152</language>