Debian Codegraph @

data/syntax/hamlet.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE language
3 [
4 <!-- names must start with a letter, ideogram or underscore. \w matches any
5 word character *or* a number, hence the lookahead -->
6 <!ENTITY name "(?![0-9])[\w_:][\w.:_-]*">
7 ]>
8 <language name="Hamlet" version="6" kateversion="5.53" section="Markup" extensions="*.hamlet" author="Bastian Holst ([email protected])" license="LGPL" indenter="haskell">
9 <highlighting>
10 <contexts>
11 <context attribute="Normal Text" lineEndContext="#pop" name="Normal Text" >
12 <RegExpr attribute="Element" context="element" String="&lt;&name;\b" />
13 <!-- A widget -->
14 <Detect2Chars attribute="Code" context="Code" char="^" char1="{"/>
15 <!-- Something implementing ToHtml -->
16 <Detect2Chars attribute="Code" context="Code" char="#" char1="{"/>
17 <!-- An URL -->
18 <Detect2Chars attribute="Code" context="Code" char="@" char1="{"/>
19 <!-- A Message -->
20 <Detect2Chars attribute="Code" context="Code" char="_" char1="{"/>
21 <DetectChar attribute="Logic" context="Logic" firstNonSpace="true" char="$"/>
22 </context>
23
24 <context attribute="Element" lineEndContext="#stay" name="element" >
25 <Detect2Chars attribute="Element" context="#pop" char="/" char1="&gt;" />
26 <DetectChar attribute="Element" context="#pop" char="&gt;" />
27 <RegExpr attribute="Attribute" context="Attribute" String="^&name;|\s+&name;" />
28 <RegExpr attribute="Class" context="#stay" String="\.&name;"/>
29 <RegExpr attribute="Error" context="#stay" String="\S" />
30 </context>
31
32 <context name="Logic" lineEndContext="#pop" attribute="Normal Text">
33 <WordDetect attribute="Logic" context="Codeline" String="if"/>
34 <WordDetect attribute="Logic" context="Codeline" String="elseif"/>
35 <WordDetect attribute="Logic" context="Assignment" String="forall"/>
36 <WordDetect attribute="Logic" context="Assignment" String="maybe"/>
37 <WordDetect attribute="Logic" context="#stay" String="else"/>
38 <WordDetect attribute="Logic" context="#stay" String="nothing"/>
39 <RegExpr attribute="Error" context="#stay" String="\S" />
40 </context>
41
42 <context name="Code" attribute="Normal Text" lineEndContext="#stay">
43 <DetectChar attribute="Code" context="#pop" char="}"/>
44 <IncludeRules context="##Haskell" />
45 </context>
46
47 <context name="Codeline" attribute="Normal Text" lineEndContext="#pop">
48 <IncludeRules context="##Haskell" />
49 </context>
50
51 <context name="Assignment" attribute="Normal Text" lineEndContext="#pop">
52 <Detect2Chars attribute="Assignment" context="Codeline" char="&lt;" char1="-"/>
53 <IncludeRules context="##Haskell" />
54 </context>
55
56 <context name="Attribute" attribute="Attribute" lineEndContext="#stay">
57 <DetectChar attribute="Attribute" context="Value" char="=" />
58 <DetectChar attribute="Element" context="#pop#pop" char="&gt;"/>
59 <RegExpr attribute="Error" context="#stay" String="\S" />
60 </context>
61
62 <context attribute="Value" lineEndContext="#stay" name="Value">
63 <DetectChar attribute="Value" context="Value DQ" char="&quot;" />
64 <DetectChar attribute="Value" context="Value SQ" char="&apos;" />
65 <Detect2Chars attribute="Code" context="Value Code" char="@" char1="{"/>
66 <Detect2Chars attribute="Code" context="Value Code" char="#" char1="{"/>
67 <RegExpr attribute="Value" context="#pop#pop" String="[^&quot;&apos;&gt;\s]+"/>
68 <RegExpr attribute="Error" context="#stay" String="\S" />
69 </context>
70
71 <context name="Value DQ" attribute="Value" lineEndContext="#stay">
72 <DetectChar attribute="Value" context="#pop#pop#pop" char="&quot;" />
73 </context>
74
75 <context name="Value SQ" attribute="Value" lineEndContext="#stay">
76 <DetectChar attribute="Value" context="#pop#pop#pop" char="&apos;" />
77 </context>
78
79 <context name="Value Code" attribute="Normal Text" lineEndContext="#stay">
80 <DetectChar attribute="Code" context="#pop#pop#pop" char="}"/>
81 <IncludeRules context="##Haskell" />
82 </context>
83
84 </contexts>
85 <itemDatas>
86 <itemData name="Normal Text" defStyleNum="dsNormal" />
87 <itemData name="Element" defStyleNum="dsKeyword" />
88 <itemData name="Attribute" defStyleNum="dsOthers" spellChecking="false" />
89 <itemData name="Class" defStyleNum="dsString" spellChecking="false" />
90 <itemData name="Value" defStyleNum="dsString" spellChecking="false" />
91 <itemData name="Logic" defStyleNum="dsKeyword" spellChecking="false" />
92 <itemData name="Code" defStyleNum="dsKeyword" spellChecking="false" />
93 <itemData name="Error" defStyleNum="dsError" spellChecking="false" />
94 <itemData name="Assignment" defStyleNum="dsOthers" spellChecking="false" />
95 </itemDatas>
96 </highlighting>
97 <general>
98 <keywords casesensitive="1"/>
99 </general>
100 </language>
101 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->