Debian Codegraph @

data/syntax/vala.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE language>
3 <!--
4 This file is part of KDE's kate project.
5
6 Copyright 2012 Antoni Boucher ([email protected])
7
8 **********************************************************************
9 * This library is free software; you can redistribute it and/or *
10 * modify it under the terms of the GNU Lesser General Public *
11 * License as published by the Free Software Foundation; either *
12 * version 2 of the License, or (at your option) any later version. *
13 * *
14 * This library is distributed in the hope that it will be useful, *
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
17 * Lesser General Public License for more details. *
18 * *
19 * You should have received a copy of the GNU Lesser General Public *
20 * License along with this library; if not, write to the *
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
22 * Boston, MA 02110-1301, USA. *
23 **********************************************************************
24 -->
25 <language name="Vala" section="Sources" version="10" kateversion="5.0" indenter="cstyle" extensions="*.vala" mimetype="text/x-vala" priority="15" author="Antoni Boucher ([email protected])" license="LGPLv2+">
26 <highlighting>
27 <list name="keywords">
28 <item>abstract</item>
29 <item>as</item>
30 <item>async</item>
31 <item>base</item>
32 <item>break</item>
33 <item>case</item>
34 <item>catch</item>
35 <item>class</item>
36 <item>const</item>
37 <item>construct</item>
38 <item>continue</item>
39 <item>default</item>
40 <item>delegate</item>
41 <item>delete</item>
42 <item>do</item>
43 <item>dynamic</item>
44 <item>else</item>
45 <item>enum</item>
46 <item>ensures</item>
47 <item>errordomain</item>
48 <item>extern</item>
49 <item>false</item>
50 <item>finally</item>
51 <item>for</item>
52 <item>foreach</item>
53 <item>get</item>
54 <item>global</item>
55 <item>if</item>
56 <item>in</item>
57 <item>inline</item>
58 <item>interface</item>
59 <item>internal</item>
60 <item>is</item>
61 <item>lock</item>
62 <item>namespace</item>
63 <item>new</item>
64 <item>null</item>
65 <item>out</item>
66 <item>override</item>
67 <item>owned</item>
68 <item>private</item>
69 <item>protected</item>
70 <item>public</item>
71 <item>ref</item>
72 <item>requires</item>
73 <item>result</item>
74 <item>return</item>
75 <item>set</item>
76 <item>signal</item>
77 <item>sizeof</item>
78 <item>static</item>
79 <item>struct</item>
80 <item>switch</item>
81 <item>this</item>
82 <item>throw</item>
83 <item>throws</item>
84 <item>true</item>
85 <item>try</item>
86 <item>typeof</item>
87 <item>unowned</item>
88 <item>using</item>
89 <item>value</item>
90 <item>virtual</item>
91 <item>weak</item>
92 <item>while</item>
93 <item>yield</item>
94 </list>
95 <list name="extensions">
96 <item>connect</item>
97 <item>connect_after</item>
98 <item>disconnect</item>
99 <item>emit</item>
100 </list>
101 <list name="types">
102 <item>bool</item>
103 <item>char</item>
104 <item>double</item>
105 <item>float</item>
106 <item>int</item>
107 <item>int8</item>
108 <item>int16</item>
109 <item>int32</item>
110 <item>int64</item>
111 <item>long</item>
112 <item>short</item>
113 <item>size_t</item>
114 <item>ssize_t</item>
115 <item>string</item>
116 <item>uchar</item>
117 <item>uint</item>
118 <item>uint8</item>
119 <item>uint16</item>
120 <item>uint32</item>
121 <item>uint64</item>
122 <item>ulong</item>
123 <item>unichar</item>
124 <item>ushort</item>
125 <item>var</item>
126 <item>void</item>
127 </list>
128 <contexts>
129 <context attribute="Normal Text" lineEndContext="#stay" name="Normal">
130 <DetectSpaces />
131 <RegExpr attribute="Preprocessor" context="Outscoped" String="#\s*if\s+0\s*$" beginRegion="PP" firstNonSpace="true" />
132 <DetectChar context="AfterHash" char="#" firstNonSpace="true" lookAhead="true" />
133 <keyword attribute="Keyword" context="#stay" String="keywords" />
134 <keyword attribute="Extensions" context="#stay" String="extensions" />
135 <keyword attribute="Data Type" context="#stay" String="types" />
136 <HlCChar attribute="Char" context="#stay"/>
137
138 <Detect2Chars attribute="String" context="String Template" char="@" char1="&quot;"/>
139 <StringDetect attribute="String" context="MultiLine String" String="&quot;&quot;&quot;"/>
140 <DetectChar attribute="String" context="String" char="&quot;"/>
141 <DetectIdentifier />
142 <Float attribute="Float" context="Float Suffixes"/>
143 <HlCOct attribute="Octal" context="#stay"/>
144 <HlCHex attribute="Hex" context="#stay"/>
145 <Int attribute="Decimal" context="Int Suffixes"/>
146 <IncludeRules context="FindComments" />
147 <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" />
148 <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" />
149 <AnyChar attribute="Symbol" context="#stay" String=":!%&amp;()+,-/.*&lt;=&gt;?[]{|}~^&#59;"/>
150 </context>
151
152 <context name="FindComments" attribute="Normal Text" lineEndContext="#pop">
153 <Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="/" lookAhead="true"/>
154 <Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="*" lookAhead="true" />
155 </context>
156
157 <context name="MatchComment" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
158 <StringDetect attribute="Region Marker" context="#pop!Region Marker" String="//BEGIN" beginRegion="Region1" firstNonSpace="true" />
159 <StringDetect attribute="Region Marker" context="#pop!Region Marker" String="//END" endRegion="Region1" firstNonSpace="true" />
160 <IncludeRules context="##Doxygen" />
161 <Detect2Chars attribute="Comment" context="#pop!Comment" char="/" char1="/"/>
162 <Detect2Chars attribute="Comment" context="#pop!MultiLine Comment" char="/" char1="*" beginRegion="Comment"/>
163 </context>
164
165 <context name="Float Suffixes" attribute="Float" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
166 <AnyChar String="fFdD" attribute="Float" context="#pop"/>
167 </context>
168
169 <context name="Int Suffixes" attribute="Decimal" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
170 <StringDetect attribute="Decimal" context="#pop" String="ULL" insensitive="true"/>
171 <StringDetect attribute="Decimal" context="#pop" String="UL" insensitive="true"/>
172 <StringDetect attribute="Decimal" context="#pop" String="LU" insensitive="true"/>
173 <StringDetect attribute="Decimal" context="#pop" String="LL" insensitive="true"/>
174 <AnyChar attribute="Decimal" context="#pop" String="ULul"/>
175 </context>
176
177 <context name="String Template Variable" attribute="String" lineEndContext="#stay">
178 <Detect2Chars attribute="Escaped Code" context="#stay" char="$" char1="$" />
179 <RegExpr attribute="Variable" context="#stay" String="\$[a-zA-Z_][a-zA-Z0-9_]*|\$\(.*?\)" minimal="true" />
180 </context>
181
182 <context attribute="String" lineEndContext="#stay" name="MultiLine String">
183 <StringDetect attribute="String" context="#pop" String="&quot;&quot;&quot;"/>
184 </context>
185
186 <context attribute="String" lineEndContext="#pop" name="String">
187 <LineContinue attribute="String" context="#stay"/>
188 <HlCStringChar attribute="String Char" context="#stay"/>
189 <DetectChar attribute="String" context="#pop" char="&quot;"/>
190 </context>
191
192 <context attribute="String" lineEndContext="#pop" name="String Template">
193 <IncludeRules context="String Template Variable" />
194 <LineContinue attribute="String" context="#stay"/>
195 <HlCStringChar attribute="String Char" context="#stay"/>
196 <DetectChar attribute="String" context="#pop" char="&quot;"/>
197 </context>
198
199 <context attribute="Region Marker" lineEndContext="#pop" name="Region Marker">
200 </context>
201
202 <context attribute="Comment" lineEndContext="#pop" name="Comment">
203 <LineContinue attribute="Comment" context="#stay"/>
204 <DetectSpaces />
205 <IncludeRules context="##Comments" />
206 <DetectIdentifier />
207 </context>
208
209 <context attribute="Comment" lineEndContext="#stay" name="MultiLine Comment">
210 <DetectSpaces />
211 <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
212 <IncludeRules context="##Comments" />
213 <DetectIdentifier />
214 </context>
215
216 <context attribute="Error" lineEndContext="#pop" name="AfterHash">
217 <!-- elif, else, endif, if -->
218 <RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*if(?=\s+\S)" insensitive="true" beginRegion="PP" firstNonSpace="true" />
219 <RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*endif" insensitive="true" endRegion="PP" firstNonSpace="true" />
220 <RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*(?:el(?:se|if))|#\s+[0-9]+" insensitive="true" firstNonSpace="true" />
221 </context>
222
223 <context attribute="Preprocessor" lineEndContext="#pop" name="Preprocessor">
224 <LineContinue attribute="Preprocessor" context="#stay"/>
225 <RangeDetect attribute="Prep. Lib" context="#stay" char="&quot;" char1="&quot;"/>
226 <RangeDetect attribute="Prep. Lib" context="#stay" char="&lt;" char1="&gt;"/>
227 <IncludeRules context="FindComments" />
228 </context>
229
230 <context attribute="Comment" lineEndContext="#stay" name="Outscoped" >
231 <DetectSpaces />
232 <IncludeRules context="##Comments" />
233 <DetectIdentifier />
234 <IncludeRules context="FindComments" />
235 <RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="PP" firstNonSpace="true" />
236 <RegExpr attribute="Preprocessor" context="#pop" String="#\s*el(?:se|if)" firstNonSpace="true" />
237 <RegExpr attribute="Preprocessor" context="#pop" String="#\s*endif" endRegion="PP" firstNonSpace="true" />
238 </context>
239
240 <context attribute="Comment" lineEndContext="#stay" name="Outscoped intern">
241 <DetectSpaces />
242 <IncludeRules context="##Comments" />
243 <DetectIdentifier />
244 <DetectChar attribute="String" context="String" char="&quot;"/>
245 <IncludeRules context="FindComments" />
246 <RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="PP" firstNonSpace="true" />
247 <RegExpr attribute="Comment" context="#pop" String="#\s*endif" endRegion="PP" firstNonSpace="true" />
248 </context>
249 </contexts>
250 <itemDatas>
251 <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
252 <itemData name="Char" defStyleNum="dsChar" spellChecking="false"/>
253 <itemData name="Comment" defStyleNum="dsComment"/>
254 <itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false"/>
255 <itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>
256 <itemData name="Error" defStyleNum="dsError" spellChecking="false"/>
257 <itemData name="Escaped Code" defStyleNum="dsSpecialChar" bold="true" italic="false" spellChecking="false" /> <!-- #0F0F8F -->
258 <itemData name="Extensions" defStyleNum="dsExtension" bold="true" italic="false" spellChecking="false"/> <!-- #0095ff -->
259 <itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/>
260 <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>
261 <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
262 <itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/>
263 <itemData name="Prep. Lib" defStyleNum="dsImport" spellChecking="false"/>
264 <itemData name="Preprocessor" defStyleNum="dsPreprocessor" spellChecking="false"/>
265 <itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false"/>
266 <itemData name="String" defStyleNum="dsString"/>
267 <itemData name="String Char" defStyleNum="dsSpecialChar"/>
268 <itemData name="Symbol" defStyleNum="dsOperator" spellChecking="false"/>
269 <itemData name="Variable" defStyleNum="dsVariable" spellChecking="false" /> <!-- #5555FF -->
270 </itemDatas>
271 </highlighting>
272 <general>
273 <comments>
274 <comment name="singleLine" start="//" />
275 <comment name="multiLine" start="/*" end="*/" region="Comment"/>
276 </comments>
277 <keywords casesensitive="true" />
278 </general>
279 </language>
280 <!-- kate: replace-tabs on; tab-width 4; indent-width 4; -->