summaryrefslogtreecommitdiffstats
path: root/kate/data/ftl.xml
blob: 84a2585a84c61779f8b21e9deb0207fba87803d7 (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="FTL" version="1.10" kateversion="2.3" section="Markup" extensions="*.ftl" license="LGPLv2+" author="Radomir Svancer (svancer@gmail.com), Robert Kratky (kratky@rob.cz>), Matthias Mailänder (matthias.mailaender@vogella.com)">
  <highlighting>
    <contexts>
        <context name="comment start" attribute="NormalText" lineEndContext="#stay">
            <StringDetect attribute="Comment" context="comment end" String="&lt;!--"/>
            <StringDetect attribute="FTLComment" context="comment ending" String="&lt;#--"/>
            <RegExpr attribute="FTLKeyword" context="syntax start" String="&lt;\s*\/?\s*[#@][a-zA-Z0-9_]*" />
            <StringDetect attribute="FTLMark" context="variable end" String="${" />
            <RegExpr attribute="Keyword" context="logic end" String="&lt;\s*\/?\s*[a-zA-Z0-9_]*" />
        </context>

        <context name="logic end" attribute="Identifier" lineEndContext="#stay">
            <DetectChar attribute="Keyword" context="#pop" char="&gt;"/>
            <RegExpr attribute="NormalText" context="logic" String="\s*=\s*"/>
            <StringDetect attribute="FTLComment" context="comment ending" String="&lt;#--"/>
            <RegExpr attribute="FTLKeyword" context="syntax start" String="&lt;\s*\/?\s*[#@][a-zA-Z0-9_]*" />
            <StringDetect attribute="FTLMark" context="variable end" String="${" />
        </context>

        <context name="logic" attribute="Types" lineEndContext="#stay">
            <RegExpr attribute="Types" context="#pop" String="\s*#?[a-zA-Z0-9]*" />
            <DetectChar attribute="Types" context="logic start" char="&quot;" />
        </context>

        <context name="logic start" attribute="Types" lineEndContext="#stay">
            <DetectChar attribute="Types" context="#pop#pop" char="&quot;" />
            <StringDetect attribute="FTLComment" context="comment ending" String="&lt;#--"/>
            <RegExpr attribute="FTLKeyword" context="syntax start" String="&lt;\s*\/?\s*[#@][a-zA-Z0-9_]*" />
            <StringDetect attribute="FTLMark" context="variable end" String="${" />
        </context>

        <context name="comment" attribute="Comment" lineEndContext="#pop"/>

        <context name="values" attribute="String" lineEndContext="#pop">
            <DetectChar attribute="String" context="#pop" char="'"/>
        </context>

        <context name="comment end" attribute="Comment" lineEndContext="#stay">
            <StringDetect attribute="Comment" context="#pop" String="--&gt;"/>
            <StringDetect attribute="FTLComment" context="comment ending" String="&lt;#--"/>
            <RegExpr attribute="FTLKeyword" context="syntax start" String="&lt;\s*\/?\s*[#@][a-zA-Z0-9_]*" />
            <StringDetect attribute="FTLMark" context="variable end" String="${" />
        </context>

        <context name="comment ending" attribute="FTLComment" lineEndContext="#stay">
            <StringDetect attribute="FTLComment" context="#pop" String="--&gt;"/>
        </context>

        <context name="syntax start" attribute="FTLKeyword" lineEndContext="#stay">
            <DetectChar attribute="FTLKeyword" context="#pop" char="&gt;"/>
            <DetectChar attribute="FTLQuot" context="comment string" char="&quot;" />
            <RegExpr attribute="FTLIdentifier" context="syntax end" String="\s*"/>
        </context>

        <context name="comment string" attribute="FTLQuot" lineEndContext="#stay">
            <DetectChar attribute="FTLQuot" context="#pop#pop" char="&quot;" />
        </context>

        <context name="syntax end" attribute="FTLIdentifier" lineEndContext="#stay">
            <DetectChar attribute="FTLKeyword" context="#pop#pop" char="&gt;"/>
            <DetectChar attribute="FTLQuot" context="comment string" char="&quot;" />
        </context>

        <context name="variable end" attribute="FTLIdentifier" lineEndContext="#stay">
            <DetectChar attribute="FTLMark" context="#pop" char="}"/>
            <DetectChar attribute="FTLQuot" context="comment string" char="&quot;" />
        </context>
    </contexts>
    <itemDatas>
      <itemData name="NormalText" defStyleNum="dsNormal"/>
      <itemData name="Keyword" defStyleNum="dsKeyword"/>
      <itemData name="Identifier" defStyleNum="dsOthers"/>
      <itemData name="Types" defStyleNum="dsDataType"/>
      <itemData name="String" defStyleNum="dsString"/>
      <itemData name="Comment" defStyleNum="dsComment"/>
      <itemData name="FTLComment" defStyleNum="dsComment" color="#7777cc" selColor="#00ff00" bold="0" italic="1"/>
      <itemData name="FTLKeyword" defStyleNum="dsKeyword" color="#0000cc" selColor="#00ff00" bold="1" italic="0"/>
      <itemData name="FTLQuot" defStyleNum="dsOthers" color="#ff0044" selColor="#00ff00" bold="0" italic="0"/>
      <itemData name="FTLIdentifier" defStyleNum="dsOthers" color="#0022bb" selColor="#00ff00" bold="0" italic="0"/>
      <itemData name="FTLMark" defStyleNum="dsOthers" color="#0000cc" selColor="#00ff00" bold="1" italic="1"/>
    </itemDatas>
  </highlighting>
  <general>
    <comments>
      <comment name="multiLine" start="&lt;#--" end="--&gt;" />
    </comments>
    <keywords casesensitive="0" />
  </general>
</language>