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
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language [
<!ENTITY identifier "[a-z][a-zA-Z0-9_]*[!?]?">
]>
<language author="Jade Pfeiffer (jade@pfeiffer.codes)"
extensions="*.eex"
indenter="none"
kateversion="5.79"
license="MIT"
mimetype="text/x-elixir+eex"
name="Elixir/EEx"
section="Scripts"
style="eex"
version="1">
<highlighting>
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="Text">
<!-- Search document using only 2 characters before matching -->
<Detect2Chars char="<" char1="%" context="Tag" lookAhead="true"/>
</context>
<context attribute="Normal Text" name="Tag">
<!-- Comments: they are discarded from source -->
<StringDetect String="<%!--" attribute="Comment" context="#pop!Comment" beginRegion="comment" />
<!-- EEx Quotation: returns the contents inside the tag as is -->
<StringDetect String="<%%" attribute="Quotation" context="#pop!Quotation" />
<!-- Elixir expression: executes code and prints result -->
<StringDetect String="<%=" attribute="Tag" context="#pop!Expression" />
<!-- Additional tags that are supported but don't have special meaning by default -->
<StringDetect String="<%|" attribute="Tag" context="#pop!Expression" />
<StringDetect String="<%/" attribute="Tag" context="#pop!Expression" />
<!-- Elixir Expression: executes code but discards output -->
<Detect2Chars char="<" char1="%" attribute="Tag" context="#pop!Expression" />
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="Expression">
<Detect2Chars char="%" char1=">" attribute="Tag" context="#pop"/>
<RegExpr String="@&identifier;" attribute="Assigns" context="#stay" />
<IncludeRules context="Normal##Elixir" />
</context>
<context attribute="Quotation" lineEndContext="#stay" name="Quotation">
<Detect2Chars char="%" char1=">" attribute="Quotation" context="#pop"/>
</context>
<context attribute="Comment" lineEndContext="#stay" name="Comment">
<StringDetect String="--%>" attribute="Comment" context="#pop" endRegion="comment" />
</context>
</contexts>
<itemDatas>
<itemData defStyleNum="dsNormal" name="Normal Text" spellChecking="false"/>
<itemData defStyleNum="dsBuiltIn" name="Tag"/>
<itemData defStyleNum="dsVerbatimString" name="Quotation"/>
<itemData defStyleNum="dsComment" name="Comment"/>
<itemData defStyleNum="dsFunction" name="Assigns"/>
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="multiLine" start="<%!--" end="--%>" region="comment" />
</comments>
</general>
</language>
<!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->
|