1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE language SYSTEM "language.dtd">
4
========================================================================
6
Haxe Language highlighting.
8
========================================================================
12
========================================================================
15
<language name="Haxe" section="Sources" extensions="*.hx;*.Hx;*.hX;*.HX;" mimetype="text/x-hxsrc" version="0.1" kateversion="3.1" casesensitive="true" author="Chad Joan" license="MIT">
17
<list name="keywords">
25
<item> continue </item>
27
<item> default </item>
31
<item> extends </item>
35
<item> function </item>
38
<item> implements </item>
41
<item> interface </item>
46
<item> override </item>
48
<item> private </item>
62
<item> typedef </item>
64
<item> untyped </item>
73
<item> package </item>
84
<item> Dynamic </item>
88
<item> Unknown </item>
93
<context attribute="Normal Text" lineEndContext="#stay" name="normal">
94
<RegExpr attribute="Preprocessor" context="#pop" String="#if(\s+\w+)?" />
95
<RegExpr attribute="Preprocessor" context="#pop" String="#(else|elseif|end|error)" />
97
<keyword attribute="Keyword" context="#stay" String="keywords"/>
98
<keyword attribute="Module" context="ModuleName" String="modules"/>
99
<keyword attribute="Type" context="#stay" String="types"/>
101
<DetectIdentifier attribute="Normal Text"/>
103
<HlCStringChar attribute="EscapeString" context="#pop"/>
105
<DetectChar attribute="RawString" context="RawString" char="'"/>
106
<DetectChar attribute="String" context="String" char="""/>
108
<Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/>
109
<Detect2Chars attribute="Comment" context="CommentBlock" char="/" char1="*" beginRegion="CommentBlock"/>
111
<DetectChar attribute="Normal Text" context="#stay" char="{" beginRegion="BraceA" />
112
<DetectChar attribute="Normal Text" context="#stay" char="}" endRegion="BraceA" />
114
<!-- Match ... and .. before numbers are matched. -->
115
<StringDetect attribute="Normal Text" context="#pop" String="..."/>
116
<Detect2Chars attribute="Normal Text" char="." char1="."/>
119
<!-- Floats must be matched before Binary|Octal|Hex|Integer -->
120
<!-- All floats except integers -->
121
<RegExpr attribute="Float" context="#pop" String="[\d][\d]*(\.(?!\.)[\d]*([eE][-+]?[\d]+)?)"/>
122
<RegExpr attribute="Float" context="#pop" String="\.[\d][\d]*([eE][-+]?[\d]+)?"/>
125
<RegExpr attribute="Hex" context="#pop" String="0[xX][\da-fA-F]+"/>
126
<RegExpr attribute="Integer" context="#pop" String="\d+"/>
129
<context attribute="Module Name" lineEndContext="#stay" name="ModuleName">
130
<Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/>
131
<Detect2Chars attribute="Comment" context="CommentBlock" char="/" char1="*" beginRegion="CommentBlock"/>
132
<RegExpr context="#pop" String="[^\s\w.:,]"/>
137
<context attribute="RawString" lineEndContext="#stay" name="RawString">
138
<DetectChar attribute="RawString" context="#pop" char="'"/>
141
<context attribute="String" lineEndContext="#stay" name="String">
142
<Detect2Chars attribute="String" context="#stay" char="\" char1="""/>
143
<DetectChar attribute="String" context="#pop" char="""/>
144
<HlCStringChar attribute="EscapeSequence"/>
145
<RegExpr attribute="EscapeSequence" context="#stay" String="\\(u[\da-fA-F]{4}|U[\da-fA-F]{8}|&[a-zA-Z]\w+;)" />
149
<context attribute="Comment" lineEndContext="#pop" name="CommentLine"/>
150
<context attribute="Comment" lineEndContext="#stay" name="CommentBlock">
151
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="CommentBlock"/>
155
<itemData name="Normal Text" defStyleNum="dsNormal"/>
156
<itemData name="Keyword" defStyleNum="dsKeyword"/>
157
<itemData name="Type" defStyleNum="dsDataType"/>
158
<itemData name="Integer" defStyleNum="dsDecVal"/>
159
<itemData name="Hex" defStyleNum="dsBaseN"/>
160
<itemData name="Float" defStyleNum="dsFloat"/>
162
<itemData name="Module" defStyleNum="dsKeyword" color="#0000ff" selColor="#ffffff"/>
163
<itemData name="Module Name" defStyleNum="dsNormal" color="#0000ff" selColor="#ffffff"/>
165
<itemData name="EscapeSequence" defStyleNum="dsString" color="#00aa88" selColor="#ff0000"/>
166
<itemData name="String" defStyleNum="dsString"/>
167
<itemData name="RawString" defStyleNum="dsString"/>
169
<itemData name="Comment" defStyleNum="dsComment"/>
171
<itemData name="Preprocessor" defStyleNum="dsOthers"/>
176
<comment name="singleLine" start="//"/>
177
<comment name="multiLine" start="/*" end="*/" />
179
<keywords casesensitive="true"/>