<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE language SYSTEM "language.dtd"> <!-- Author: Anders Lund <anders@alweb.dk> //--> <!-- Minimal javascript support //--> <language name="JavaScript" version="0.1" kateversion="2.0" section="Scripts" extensions="*.js" mimetype="text/x-javascript"> <highlighting> <list name="keywords"> <item> if </item> <item> else </item> <item> for </item> <item> in </item> <item> while </item> <item> do </item> <item> continue </item> <item> break </item> <item> with </item> <item> try </item> <item> catch </item> <item> switch </item> <item> case </item> <item> new </item> <item> var </item> <item> function </item> <item> return </item> <item> this </item> <item> delete </item> <item> true </item> <item> false </item> <item> void </item> <item> throw </item> <item> typeof </item> <item> const </item> <item> default </item> </list> <contexts> <context attribute="0" lineEndContext="#stay" name="Normal"> <Float attribute="2" context="0"> <AnyChar String="fF" attribute="2" context="0" /> </Float> <Int attribute="2" context="#stay" /> <keyword attribute="1" context="0" String="keywords" /> <DetectChar attribute="3" context="1" char=""" /> <DetectChar attribute="3" context="2" char="'" /> <Detect2Chars attribute="5" context="4" char="/" char1="/" /> <Detect2Chars attribute="5" context="5" char="/" char1="*" /> <RegExpr attribute="0" context="7" String="\s*[=?:]\s*" /> <RegExpr attribute="0" context="7" String="(search|replace)\s*\(\s*" /> </context> <context attribute="3" lineEndContext="#stay" name="String"> <Detect2Chars attribute="3" context="#stay" char="\" char1=""" /> <HlCStringChar attribute="4" context="#stay" /> <DetectChar attribute="3" context="#pop" char=""" /> </context> <context attribute="3" lineEndContext="#stay" name="String (2)"> <Detect2Chars attribute="3" context="#stay" char="\" char1="'" /> <HlCStringChar attribute="4" context="#stay" /> <DetectChar attribute="3" context="#pop" char="'" /> </context> <context attribute="0" lineEndContext="0" name="Comment common"> <RegExpr attribute="6" context= "#stay" String="\b(?:fixme|todo|note)\b" insensitive="TRUE" /> </context> <context attribute="5" lineEndContext="#pop" name="Single Line Comment"> <IncludeRules context="3" /> </context> <context attribute="5" lineEndContext="#stay" name="Multiline/Inline Comment"> <Detect2Chars attribute="5" context="#pop" char="*" char1="/" /> <IncludeRules context="3" /> </context> <context attribute="7" lineEndContext="#stay" name="Regular Expression"> <RegExpr attribute="7" context="#pop#pop#pop" String="/[ig]{0,2}" /> <RegExpr attribute="8" context="#stay" String="\{[\d, ]+\}" /> <RegExpr attribute="8" context="#stay" String="\\[bB]" /> <RegExpr attribute="9" context="#stay" String="\\[nrtvfDdSsWw]" /> <RegExpr attribute="7" context="#stay" String="\\." /> <DetectChar attribute="9" context="10" char="[" /> <RegExpr attribute="8" context="#stay" String="\$(?=/)" /> <AnyChar attribute="8" context="#stay" String="?+*()|" /> </context> <context attribute="0" lineEndContext="#stay" name="(Internal regex catch)" fallthrough="true" fallthroughContext="#pop"> <RegExpr attribute="0" context="#stay" String="\s*" /> <RegExpr attribute="7" context="#pop" String="//(?=;)" /> <Detect2Chars attribute="5" context="4" char="/" char1="/" /> <Detect2Chars attribute="5" context="5" char="/" char1="*" /> <DetectChar attribute="7" context="9" char="/" /> </context> <context attribute="9" lineEndcontext="#stay" name="Regular Expression Character Class"> <RegExpr attribute="9" context="#stay" String="\\[\[\]]" /> <DetectChar attribute="9" context="#pop#pop" char="]" /> </context> <context attribute="8" lineEndContext="#pop" name="(regex caret first check)" fallthrough="true" fallthroughContext="6"> <DetectChar attribute="8" context="6" char="^" /> </context> <context attribute="8" lineEndContext="#pop" name="(charclass caret first check)" fallthrough="true" fallthroughContext="8"> <DetectChar attribute="8" context="8" char="^" /> </context> </contexts> <itemDatas> <itemData name="Normal Text" defStyleNum="dsNormal" /> <itemData name="Keyword" defStyleNum="dsKeyword" /> <itemData name="Number" defStyleNum="dsDecVal" /> <itemData name="String" defStyleNum="dsString" /> <itemData name="String Char" defStyleNum="dsChar" /> <itemData name="Comment" defStyleNum="dsComment" /> <itemData name="Note" defStyleNum="dsDecVal" /> <itemData name="Regular Expression" defStyleNum="dsOthers" /> <itemData name="Pattern Internal Operator" defStyleNum="dsFloat" /> <itemData name="Pattern Character Class" defStyleNum="dsBaseN" /> </itemDatas> </highlighting> <general> <comments> <comment name="singleLine" start="//" /> <comment name="multiLine" start="/*" end="*/" /> </comments> <keywords casesensitive="1" /> </general> </language>