Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/doxygenlua.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
---|---|---|---|---|---|
2 | <!DOCTYPE language SYSTEM "language.dtd" | 2 | <!DOCTYPE language SYSTEM "language.dtd" | ||
3 | [ | 3 | [ | ||
4 | <!ENTITY wordsep "([][,?;()]|\.$|\.?\s)"> <!-- things that end a TagWord --> | 4 | <!ENTITY wordsep "([][,?;()]|\.$|\.?\s)"> <!-- things that end a TagWord --> | ||
5 | ]> | 5 | ]> | ||
6 | <!-- | 6 | <!-- | ||
7 | sed -E ' | 7 | sed -E ' | ||
8 | s/<Detect2Chars(.*)char="\*" char1="\/"(.*)/<StringDetect\1String="]%1]" dynamic="true"\2/ | 8 | s/<Detect2Chars(.*)char="\*" char1="\/"(.*)/<StringDetect\1String="]%1]" dynamic="true"\2/ | ||
9 | s/<context name="ML_/<context dynamic="true" name="ML_/ | 9 | s/ (name="ML_|name="BlockComment")/ dynamic="true" \1/ | ||
10 | ' doxygen.xml > doxygenlua.xml | 10 | ' doxygen.xml > doxygenlua.xml | ||
11 | 11 | | |||
12 | + edit | 12 | + edit | ||
13 | - <language> | 13 | - <language> | ||
14 | - "Normal Text" context | 14 | - "Normal Text" context | ||
15 | - grep '\\\*' doxygenlua.xml | 15 | - grep '\\\*' doxygenlua.xml | ||
16 | --> | 16 | --> | ||
17 | <language name="DoxygenLua" | 17 | <language name="DoxygenLua" | ||
18 | version="5" | 18 | version="6" | ||
19 | kateversion="5.0" | 19 | kateversion="5.0" | ||
20 | section="Markup" | 20 | section="Markup" | ||
21 | extensions="" | 21 | extensions="" | ||
22 | mimetype="" | 22 | mimetype="" | ||
23 | author="Dominik Haumann (dhaumann@kde.org)" | 23 | author="Dominik Haumann (dhaumann@kde.org)" | ||
24 | license="MIT"> | 24 | license="MIT"> | ||
25 | <highlighting> | 25 | <highlighting> | ||
26 | <!-- NOTE: all tags may begin with a \ or @ char | 26 | <!-- NOTE: all tags may begin with a \ or @ char | ||
▲ Show 20 Lines • Show All 231 Lines • ▼ Show 20 Line(s) | 249 | <context attribute="Comment" lineEndContext="#pop" name="LineComment"> | |||
258 | <keyword attribute="Tags" context="SL_TagString" String="TagString" /> | 258 | <keyword attribute="Tags" context="SL_TagString" String="TagString" /> | ||
259 | <keyword attribute="Tags" context="SL_TagWordString" String="TagWordString" /> | 259 | <keyword attribute="Tags" context="SL_TagWordString" String="TagWordString" /> | ||
260 | <RegExpr attribute="Custom Tags" context="#stay" String="[@\\][^@\\ \t]+" /> | 260 | <RegExpr attribute="Custom Tags" context="#stay" String="[@\\][^@\\ \t]+" /> | ||
261 | <DetectIdentifier /> | 261 | <DetectIdentifier /> | ||
262 | <StringDetect attribute="HTML Comment" context="SL_htmlcomment" String="<!--" /> | 262 | <StringDetect attribute="HTML Comment" context="SL_htmlcomment" String="<!--" /> | ||
263 | <Detect2Chars attribute="Comment" context="#stay" char="<" char1="<" /> | 263 | <Detect2Chars attribute="Comment" context="#stay" char="<" char1="<" /> | ||
264 | <RegExpr attribute="HTML Tag" context="SL_htmltag" String="<\/?[-\w0-9._:@]+" /> | 264 | <RegExpr attribute="HTML Tag" context="SL_htmltag" String="<\/?[-\w0-9._:@]+" /> | ||
265 | </context> | 265 | </context> | ||
266 | <context attribute="Comment" lineEndContext="#stay" name="BlockComment"> | 266 | <context attribute="Comment" lineEndContext="#stay" dynamic="true" name="BlockComment"> | ||
267 | <DetectSpaces /> | 267 | <DetectSpaces /> | ||
268 | <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" endRegion="BlockComment" /> | 268 | <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" endRegion="BlockComment" /> | ||
269 | <IncludeRules context="##Alerts" /> | 269 | <IncludeRules context="##Alerts" /> | ||
270 | <Detect2Chars attribute="Region" context="#stay" char="@" char1="{" beginRegion="Group" /> | 270 | <Detect2Chars attribute="Region" context="#stay" char="@" char1="{" beginRegion="Group" /> | ||
271 | <Detect2Chars attribute="Region" context="#stay" char="@" char1="}" endRegion="Group" /> | 271 | <Detect2Chars attribute="Region" context="#stay" char="@" char1="}" endRegion="Group" /> | ||
272 | <IncludeRules context="SL_DetectEnv" /> | 272 | <IncludeRules context="SL_DetectEnv" /> | ||
273 | <keyword attribute="Tags" context="#stay" String="TagOnly" /> | 273 | <keyword attribute="Tags" context="#stay" String="TagOnly" /> | ||
274 | <keyword attribute="Tags" context="ML_TagWord" String="TagWord" /> | 274 | <keyword attribute="Tags" context="ML_TagWord" String="TagWord" /> | ||
Show All 13 Lines | 287 | <!-- NOTE: all contexts beginning with ML_ are for multiline comments | |||
288 | The following contexts contain a Detect2Chars that looks for a */ sequence | 288 | The following contexts contain a Detect2Chars that looks for a */ sequence | ||
289 | to end multiline comments. Singleline comments do not have this limitation - | 289 | to end multiline comments. Singleline comments do not have this limitation - | ||
290 | that's why all contexts are copy&pasted and the line <Detect2Chars ... */> is removed. | 290 | that's why all contexts are copy&pasted and the line <Detect2Chars ... */> is removed. | ||
291 | <IncludeRules context="acontext"> could be used instead but it would make context switching | 291 | <IncludeRules context="acontext"> could be used instead but it would make context switching | ||
292 | much more complex and very hard to understand! (But use IncludeRules where the rules don't | 292 | much more complex and very hard to understand! (But use IncludeRules where the rules don't | ||
293 | refer to another SL_*/ML_* context, to help maintainability.) | 293 | refer to another SL_*/ML_* context, to help maintainability.) | ||
294 | --> | 294 | --> | ||
295 | <!-- tag contexts --> | 295 | <!-- tag contexts --> | ||
296 | <context attribute="Comment" lineEndContext="#pop" name="ML_TagWord"> | 296 | <context attribute="Comment" lineEndContext="#pop" dynamic="true" name="ML_TagWord"> | ||
297 | <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" lookAhead="true" /> | 297 | <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" lookAhead="true" /> | ||
298 | <IncludeRules context="SL_TagWord" /> | 298 | <IncludeRules context="SL_TagWord" /> | ||
299 | </context> | 299 | </context> | ||
300 | <context attribute="Comment" lineEndContext="#pop" name="ML_TagParam"> | 300 | <context attribute="Comment" lineEndContext="#pop" dynamic="true" name="ML_TagParam"> | ||
301 | <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" lookAhead="true" /> | 301 | <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" lookAhead="true" /> | ||
302 | <DetectSpaces /> | 302 | <DetectSpaces /> | ||
303 | <StringDetect attribute="Tags" context="ML_Tag2ndWord" String="[in]" /> | 303 | <StringDetect attribute="Tags" context="ML_Tag2ndWord" String="[in]" /> | ||
304 | <StringDetect attribute="Tags" context="ML_Tag2ndWord" String="[out]" /> | 304 | <StringDetect attribute="Tags" context="ML_Tag2ndWord" String="[out]" /> | ||
305 | <StringDetect attribute="Tags" context="ML_Tag2ndWord" String="[in,out]" /> | 305 | <StringDetect attribute="Tags" context="ML_Tag2ndWord" String="[in,out]" /> | ||
306 | <RegExpr attribute="Word" context="#pop" String="\S(?=&wordsep;)" /> | 306 | <RegExpr attribute="Word" context="#pop" String="\S(?=&wordsep;)" /> | ||
307 | <RegExpr attribute="Word" context="#stay" String="\S" /> | 307 | <RegExpr attribute="Word" context="#stay" String="\S" /> | ||
308 | </context> | 308 | </context> | ||
309 | <context attribute="Comment" lineEndContext="#pop" name="ML_TagWordWord"> | 309 | <context attribute="Comment" lineEndContext="#pop" dynamic="true" name="ML_TagWordWord"> | ||
310 | <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" lookAhead="true" /> | 310 | <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" lookAhead="true" /> | ||
311 | <DetectSpaces /> | 311 | <DetectSpaces /> | ||
312 | <RegExpr attribute="Word" context="ML_Tag2ndWord" String="\S(?=&wordsep;)" /> | 312 | <RegExpr attribute="Word" context="ML_Tag2ndWord" String="\S(?=&wordsep;)" /> | ||
313 | <RegExpr attribute="Word" context="#stay" String="\S" /> | 313 | <RegExpr attribute="Word" context="#stay" String="\S" /> | ||
314 | </context> | 314 | </context> | ||
315 | <!-- TODO for kate 2.x, convert references to "#pop!ML_TagWord" --> | 315 | <!-- TODO for kate 2.x, convert references to "#pop!ML_TagWord" --> | ||
316 | <context attribute="Comment" lineEndContext="#pop#pop" name="ML_Tag2ndWord"> | 316 | <context attribute="Comment" lineEndContext="#pop#pop" dynamic="true" name="ML_Tag2ndWord"> | ||
317 | <StringDetect attribute="Comment" context="#pop#pop" String="]%1]" dynamic="true" lookAhead="true" /> | 317 | <StringDetect attribute="Comment" context="#pop#pop" String="]%1]" dynamic="true" lookAhead="true" /> | ||
318 | <IncludeRules context="SL_Tag2ndWord" /> | 318 | <IncludeRules context="SL_Tag2ndWord" /> | ||
319 | </context> | 319 | </context> | ||
320 | <context attribute="Comment" lineEndContext="#pop" name="ML_TagString"> | 320 | <context attribute="Comment" lineEndContext="#pop" dynamic="true" name="ML_TagString"> | ||
321 | <DetectSpaces /> | 321 | <DetectSpaces /> | ||
322 | <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" lookAhead="true" /> | 322 | <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" lookAhead="true" /> | ||
323 | <StringDetect attribute="HTML Comment" context="ML_htmlcomment" String="<!--" /> | 323 | <StringDetect attribute="HTML Comment" context="ML_htmlcomment" String="<!--" /> | ||
324 | <Detect2Chars attribute="Comment" context="#stay" char="<" char1="<" /> | 324 | <Detect2Chars attribute="Comment" context="#stay" char="<" char1="<" /> | ||
325 | <RegExpr attribute="HTML Tag" context="ML_htmltag" String="<\/?[-\w0-9._:@]+" /> | 325 | <RegExpr attribute="HTML Tag" context="ML_htmltag" String="<\/?[-\w0-9._:@]+" /> | ||
326 | <RegExpr attribute="Description" context="#stay" String="." /> | 326 | <RegExpr attribute="Description" context="#stay" String="." /> | ||
327 | </context> | 327 | </context> | ||
328 | <context attribute="Comment" lineEndContext="#pop" name="ML_TagWordString"> | 328 | <context attribute="Comment" lineEndContext="#pop" dynamic="true" name="ML_TagWordString"> | ||
329 | <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" lookAhead="true" /> | 329 | <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" lookAhead="true" /> | ||
330 | <IncludeRules context="SL_TagWordString" /> | 330 | <IncludeRules context="SL_TagWordString" /> | ||
331 | </context> | 331 | </context> | ||
332 | 332 | | |||
333 | <!-- html contexts --> | 333 | <!-- html contexts --> | ||
334 | <context dynamic="true" name="ML_htmltag" attribute="Identifier" lineEndContext="#stay"> | 334 | <context dynamic="true" name="ML_htmltag" attribute="Identifier" lineEndContext="#stay"> | ||
335 | <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" lookAhead="true" /> | 335 | <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" lookAhead="true" /> | ||
336 | <Detect2Chars attribute="HTML Tag" context="#pop" char="/" char1=">" /> | 336 | <Detect2Chars attribute="HTML Tag" context="#pop" char="/" char1=">" /> | ||
▲ Show 20 Lines • Show All 161 Lines • Show Last 20 Lines |