~technomancy/fennel-lang.org

ref: 10c80a6c65aa49c6154bc66593b0f84736160dab fennel-lang.org/fennel-syntax-foot.xml -rw-r--r-- 4.4 KiB
10c80a6cPhil Hagelberg Use syntax highlighter derived from fennel.syntax table. 3 months ago
                                                                                
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
    <contexts>
      <context name="Level0" attribute="Normal" lineEndContext="#stay">
        <DetectChar attribute="Brackets1" context="Level1" char="("/>
        <IncludeRules context="Default" />
      </context>
      <context name="Default" attribute="Normal" lineEndContext="#stay">
        <RegExpr attribute="Comment" context="#stay" String=";.*$"/>
        <keyword attribute="Keyword" context="#stay" String="keywords"/>
        <keyword attribute="Operator" context="#stay" String="operators"/>
        <keyword attribute="Definition" context="function_decl" String="defines"/>
        <DetectChar attribute="String" context="String" char="&quot;"/>
        <Float attribute="Float" context="#stay"/>
        <Int attribute="Decimal" context="#stay"/>
        <DetectChar attribute="Brackets1" context="Level1" char="("/>
      </context>
      <context name="String" attribute="String" lineEndContext="#stay">
        <RegExpr attribute="Char" context="#stay" String="#\\."/>
        <Detect2Chars attribute="Char" context="#stay" char="\" char1="&quot;"/>
        <Detect2Chars attribute="Char" context="#stay" char="\" char1="\"/>
        <DetectChar attribute="String" context="#pop" char="&quot;"/>
      </context>
      <context name="function_decl" attribute="Function" lineEndContext="#stay">
        <RegExpr attribute="Function" context="#pop" String="\s*[A-Za-z0-9-+\&lt;\&gt;//\*]*\s*" />
      </context>
      <context name="Level1" attribute="Normal" lineEndContext="#stay">
        <DetectChar attribute="Brackets2" context="Level2" char="("/>
        <DetectChar attribute="Brackets1" context="#pop" char=")" />
        <IncludeRules context="Default" />
      </context>
      <context name="Level2" attribute="Normal" lineEndContext="#stay">
        <DetectChar attribute="Brackets3" context="Level3" char="("/>
        <DetectChar attribute="Brackets2" context="#pop" char=")" />
        <IncludeRules context="Default" />
      </context>
      <context name="Level3" attribute="Normal" lineEndContext="#stay">
        <DetectChar attribute="Brackets4" context="Level4" char="("/>
        <DetectChar attribute="Brackets3" context="#pop" char=")" />
        <IncludeRules context="Default" />
      </context>
      <context name="Level4" attribute="Normal" lineEndContext="#stay">
        <DetectChar attribute="Brackets5" context="Level5" char="("/>
        <DetectChar attribute="Brackets4" context="#pop" char=")" />
        <IncludeRules context="Default" />
      </context>
      <context name="Level5" attribute="Normal" lineEndContext="#stay">
        <DetectChar attribute="Brackets6" context="Level6" char="("/>
        <DetectChar attribute="Brackets5" context="#pop" char=")" />
        <IncludeRules context="Default" />
      </context>
      <context name="Level6" attribute="Normal" lineEndContext="#stay">
        <DetectChar attribute="Brackets1" context="Level1" char="("/>
        <DetectChar attribute="Brackets6" context="#pop" char=")" />
        <IncludeRules context="Default" />
      </context>
    </contexts>
    <itemDatas>
      <itemData name="Normal"      defStyleNum="dsNormal"/>
      <itemData name="Keyword"     defStyleNum="dsKeyword"/>
      <itemData name="Definition"  defStyleNum="dsExtension"/>
      <itemData name="Operator"    defStyleNum="dsOperator"/>
      <itemData name="Function"    defStyleNum="dsFunction"/>
      <itemData name="Decimal"     defStyleNum="dsDecVal"/>
      <itemData name="Float"       defStyleNum="dsFloat"/>
      <itemData name="Char"        defStyleNum="dsChar"/>
      <itemData name="String"      defStyleNum="dsString"/>
      <itemData name="Comment"     defStyleNum="dsComment"/>
      <itemData name="Region Marker" defStyleNum="dsRegionMarker"/>
      <itemData name="Brackets1"    defStyleNum="dsNormal" color="#ff0000" bold="1"/>
      <itemData name="Brackets2"    defStyleNum="dsNormal" color="#ff8800" bold="1"/>
      <itemData name="Brackets3"    defStyleNum="dsNormal" color="#888800" bold="1"/>
      <itemData name="Brackets4"    defStyleNum="dsNormal" color="#008800" bold="1"/>
      <itemData name="Brackets5"    defStyleNum="dsNormal" color="#000088" bold="1"/>
      <itemData name="Brackets6"    defStyleNum="dsNormal" color="#880088" bold="1"/>
    </itemDatas>
  </highlighting>
  <general>
    <keywords casesensitive="1" weakDeliminator="-+*?!&lt;&gt;=/:#\"/>
    <comments>
      <comment name="singleLine" start=";" />
    </comments>
  </general>
</language>