edn/data/languages/bash/highlight.xml

41 lines
1.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<EdnLang version="0.1" lang="Bash script">
<ext>.*\.sh</ext>
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
<rule name="first line">
<color>commentDoxygen</color>
<regex>#!(.|\\[\\\n])*?$</regex>
</rule>
<rule name="comment line">
<color>comment</color>
<regex>#(.|\\[\\\n])*?$</regex>
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>&quot;(.|\\[\\&quot;])*?&quot;</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>&apos;(.|\\[\\&apos;])*?&apos;</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my keyword">
<color>keyword</color>
<regex>\b(for|done|do|while|in|if|elif|then|else|fi)\b</regex>
</rule>
<rule name="my Variable">
<color>keyword</color>
<regex>[\$]+[a-zA-Z_][a-zA-Z0-9_]*</regex>
</rule>
<rule name="Function name">
<color>functionName</color>
<regex>function (\w|_)+[ \t]*\(</regex>
</rule>
<rule name="condition">
<color>boolean</color>
<regex>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}</regex>
</rule>
</pass2>
</EdnLang>