forked from slint-ui/slint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
slint.ksyntaxhighlighter.xml
113 lines (105 loc) · 4.33 KB
/
slint.ksyntaxhighlighter.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright © SixtyFPS GmbH <[email protected]> -->
<!-- # SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial -->
<language name="Slint" version="1" kateversion="5.0" section="Sources" extensions="*.slint" mimetype="text/slint" indenter="cstyle" license="GPL" author="[email protected]" priority="6">
<highlighting>
<list name="types">
<item>int</item>
<item>bool</item>
<item>float</item>
<item>duration</item>
<item>angle</item>
<item>string</item>
<item>image</item>
<item>brush</item>
<item>color</item>
<item>length</item>
<item>physical-length</item>
<item>relative-font-size</item>
</list>
<list name="keywords">
<item>import</item>
<item>from</item>
<item>export</item>
<item>global</item>
<item>struct</item>
<item>enum</item>
<item>component</item>
<item>inherits</item>
<item>property</item>
<item>in</item>
<item>out</item>
<item>in-out</item>
<item>function</item>
<item>private</item>
<item>public</item>
<item>callback</item>
<item>animate</item>
<item>states</item>
<item>transitions</item>
<item>if</item>
<item>for</item>
<item>return</item>
<item>@tr</item>
<item>@children</item>
<item>@image-url</item>
<item>@linear-gradient</item>
<item>@radial-gradient</item>
</list>
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="Normal Text">
<RegExpr attribute="Property" context="#stay" String="[a-zA-Z_][a-zA-Z_\-0-9]*:" />
<RegExpr attribute="Property" context="#stay" String="[a-zA-Z_][a-zA-Z_\-0-9]* *<?=>" />
<RegExpr attribute="Color" context="#stay" String="#[0-9a-fA-F]+" />
<keyword attribute="Types" context="#stay" String="types" />
<keyword attribute="Keyword" context="#stay" String="keywords" />
<DetectSpaces/>
<IncludeRules context="Comments"/>
<DetectChar attribute="String" context="string" char=""" />
<RegExpr attribute="Number" context="#stay" String="[0-9]+\.?[0-9]*[a-z%]*" />
<AnyChar attribute="Symbol" context="#stay" String="!%&()+,-/*<=>?[]&|;"/>
</context>
<context attribute="String" lineEndContext="#stay" name="string" >
<IncludeRules context="EscapeString" />
<DetectChar attribute="String" context="#pop" char=""" />
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="EscapeString">
<LineContinue attribute="String" context="#stay" />
<DetectChar attribute="String" context="Character Escape" char="\" />
</context>
<context attribute="String" lineEndContext="#pop" name="Character Escape">
<RegExpr attribute="String" context="#pop" String="." />
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="Comments">
<Detect2Chars char="/" char1="/" attribute="Comment" context="CommentsLine"/>
<Detect2Chars char="/" char1="*" attribute="Comment" context="CommentsBlock" beginRegion="Comment"/>
</context>
<context attribute="Comment" lineEndContext="#pop" name="CommentsLine">
<DetectSpaces/>
</context>
<context attribute="Comment" lineEndContext="#stay" name="CommentsBlock">
<DetectSpaces/>
<Detect2Chars char="/" char1="*" attribute="Comment" context="CommentsBlock" beginRegion="Comment"/>
<Detect2Chars char="*" char1="/" attribute="Comment" context="#pop" endRegion="Comment"/>
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" />
<itemData name="Keyword" defStyleNum="dsKeyword" />
<itemData name="String" defStyleNum="dsString" />
<itemData name="Types" defStyleNum="dsDataType" />
<itemData name="Comment" defStyleNum="dsComment" />
<itemData name="Number" defStyleNum="dsFloat" />
<itemData name="Symbol" defStyleNum="dsOperator" />
<itemData name="Property" defStyleNum="dsVariable" />
<itemData name="Color" defStyleNum="dsConstant" />
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="//" />
<comment name="multiLine" start="/*" end="*/" region="Comment"/>
</comments>
<keywords casesensitive="1" />
</general>
</language>