summaryrefslogtreecommitdiffstats
path: root/kate/data/makefile.xml
diff options
context:
space:
mode:
Diffstat (limited to 'kate/data/makefile.xml')
-rw-r--r--kate/data/makefile.xml53
1 files changed, 35 insertions, 18 deletions
diff --git a/kate/data/makefile.xml b/kate/data/makefile.xml
index fc322d737..c0473c958 100644
--- a/kate/data/makefile.xml
+++ b/kate/data/makefile.xml
@@ -3,7 +3,8 @@
<!-- Makefile syntaxfile v0.9 by Per Wigren <wigren@home.se> -->
<!-- Modified by Joseph Wenninger <jowenn@kde.org> -->
<!-- Modified by Rui Santana <santana.rui@gmail.com> -->
-<language name="Makefile" version="1.10" kateversion="2.4" section="Other" extensions="GNUmakefile;Makefile*;makefile*" mimetype="text/x-makefile" author="Per Wigren (wigren@home.se)" license="">
+<!-- small priority to allow for example Makefile.cpp to be detected as cpp file -->
+<language name="Makefile" version="1.12" kateversion="2.4" section="Other" extensions="GNUmakefile;Makefile;makefile;GNUmakefile.*;Makefile.*;makefile.*" mimetype="text/x-makefile" author="Per Wigren (wigren@home.se)" license="">
<highlighting>
<list name = "keywords">
<item> include </item>
@@ -57,11 +58,12 @@
<contexts>
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
<keyword attribute="Keyword" context="#stay" String="keywords"/>
- <RegExpr attribute="Variable" context="Value" String="[_\w\d]*\s*(?=:=|=)"/>
+ <RegExpr attribute="Variable" context="Value" String="[_\w\d]*\s*(?=:=|=|\+=|\?=)"/>
<RegExpr attribute="Target" context="#stay" String="[_\w\d-]*\s*:" firstNonSpace="true"/>
<RegExpr attribute="Section" context="#stay" String="^[.].*:"/>
<DetectChar attribute="String" context="String" char="&quot;"/>
- <RegExpr attribute="Operator" context="VarFromNormal" String="[$][\({]"/>
+ <Detect2Chars attribute="Operator" context="VarFromNormal{" char="$" char1="{"/>
+ <Detect2Chars attribute="Operator" context="VarFromNormal(" char="$" char1="("/>
<Detect2Chars attribute="Special" context="#stay" char="\" char1="#"/>
<Detect2Chars attribute="Special" context="#stay" char="\" char1="\"/>
<AnyChar attribute="Operator" context="#stay" String="+*=%$():\&#059;"/>
@@ -74,32 +76,47 @@
<DetectChar attribute="String" context="#pop" char="&quot;"/>
</context>
- <context name="Value" attribute="String" lineEndContext="#stay">
- <RegExpr attribute="Operator" String="\\$" context="#stay"/>
- <RegExpr attribute="String" String="[^\\]?$" context="#pop"/>
- <RegExpr attribute="Operator" String="[$][\({]" context="VarFromValue"/>
+ <context name="Value" attribute="String" lineEndContext="#pop">
+ <LineContinue attribute="Operator"/>
+ <Detect2Chars attribute="Operator" context="VarFromValue{" char="$" char1="{"/>
+ <Detect2Chars attribute="Operator" context="VarFromValue(" char="$" char1="("/>
<RegExpr attribute="Special" context="#pop" String="@[-_\d\w]*@" />
<DetectChar attribute="Operator" char="&#059;" context="#pop"/>
</context>
- <context name="VarFromValue" attribute="Variable" lineEndContext="#stay">
- <RegExpr attribute="Operator" String="[\)}](?=/)" context="#pop"/>
- <RegExpr attribute="Operator" String="[\)}][^$]" context="#pop"/>
- <RegExpr attribute="Operator" String="[\)}]$" context="#pop#pop"/>
+ <context name="VarFromValue(" attribute="Variable" lineEndContext="#stay">
+ <DetectChar attribute="Operator" char=")" context="#pop"/>
</context>
- <context name="VarFromNormal" attribute="Variable" lineEndContext="#stay">
- <keyword attribute="Keyword" context="FunctionCall" String="functions"/>
- <AnyChar attribute="Operator" String=")}" context="#pop"/>
+ <context name="VarFromValue{" attribute="Variable" lineEndContext="#stay">
+ <DetectChar attribute="Operator" char="}" context="#pop"/>
</context>
- <context name="FunctionCall" attribute="String" lineEndContext="#stay">
- <RegExpr attribute="Operator" context="VarFromNormal" String="[$][\({]"/>
- <AnyChar attribute="Operator" String=")}" context="#pop#pop"/>
+ <context name="VarFromNormal(" attribute="Variable" lineEndContext="#stay">
+ <keyword attribute="Keyword" context="FunctionCall(" String="functions"/>
+ <DetectChar attribute="Operator" char=")" context="#pop"/>
+ </context>
+
+ <context name="VarFromNormal{" attribute="Variable" lineEndContext="#stay">
+ <keyword attribute="Keyword" context="FunctionCall{" String="functions"/>
+ <DetectChar attribute="Comment" char="}" context="#pop"/>
+ </context>
+
+ <context name="FunctionCall(" attribute="String" lineEndContext="#stay">
+ <Detect2Chars attribute="Operator" context="VarFromNormal{" char="$" char1="{"/>
+ <Detect2Chars attribute="Operator" context="VarFromNormal(" char="$" char1="("/>
+ <DetectChar attribute="Operator" char=")" context="#pop#pop"/>
+ </context>
+
+ <context name="FunctionCall{" attribute="String" lineEndContext="#stay">
+ <Detect2Chars attribute="Operator" context="VarFromNormal{" char="$" char1="{"/>
+ <Detect2Chars attribute="Operator" context="VarFromNormal(" char="$" char1="("/>
+ <DetectChar attribute="Operator" char="}" context="#pop#pop"/>
</context>
<context name="Commands" attribute="Normal Text" lineEndContext="#pop">
- <RegExpr attribute="Operator" context="VarFromNormal" String="[$][\({]"/>
+ <Detect2Chars attribute="Operator" context="VarFromNormal{" char="$" char1="{"/>
+ <Detect2Chars attribute="Operator" context="VarFromNormal(" char="$" char1="("/>
<RegExpr attribute="Commands" context="#pop" String="[_\w-]*\b"/>
</context>