tibia-client/tools/katepart-syntax/lua.xml

241 lines
13 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="Lua" version="2.0" indenter="lua" kateversion="2.4" section="Scripts" extensions="*.lua" mimetype="text/x-lua">
<highlighting>
<list name="keywords">
<item> and </item>
<item> function </item>
<item> in </item>
<item> local </item>
<item> not </item>
<item> or </item>
</list>
<list name="control">
<item> break </item>
<item> do </item>
<item> else </item>
<item> elseif </item>
<item> end </item>
<item> for </item>
<item> if </item>
<item> repeat </item>
<item> return </item>
<item> then </item>
<item> until </item>
<item> while </item>
</list>
<list name="pseudo-variables">
<item> nil </item>
<item> false </item>
<item> true </item>
</list>
<list name="lua-base-functions">
<item> string.byte </item> <item> string.char </item>
<item> string.find </item> <item> string.len </item>
<item> string.lower </item> <item> string.rep </item>
<item> string.sub </item> <item> string.upper </item>
<item> string.format </item><item> string.gfind </item>
<item> string.gsub </item> <item> table.concat </item>
<item> table.getn </item> <item> table.sort </item>
<item> table.insert </item> <item> table.remove </item>
<item> table.setn </item> <item> math.abs </item>
<item> math.sin </item> <item> math.cos </item>
<item> math.tan </item> <item> math.asin </item>
<item> math.acos </item> <item> math.atan </item>
<item> math.atan2 </item> <item> math.ceil </item>
<item> math.floor </item> <item> math.mod </item>
<item> math.frexp </item> <item> math.ldexp </item>
<item> math.squrt </item> <item> math.min </item>
<item> math.max </item> <item> math.log </item>
<item> math.log10 </item> <item> math.exp </item>
<item> math.deg </item> <item> math.rad </item>
<item> math.random </item> <item> math.randomseed </item>
<item> io.close </item> <item> io.flush </item>
<item> io.input </item> <item> io.lines </item>
<item> io.open </item> <item> io.output </item>
<item> io.read </item> <item> io.stderr </item>
<item> io.stdin </item> <item> io.stdout </item>
<item> io.tmpfile </item> <item> io.write </item>
<item> os.clock </item> <item> os.date </item>
<item> os.difftime </item> <item> os.execute </item>
<item> os.exit </item> <item> os.getenv </item>
<item> os.remove </item> <item> os.rename </item>
<item> os.setlocale </item> <item> os.time </item>
<item> os.tmpname </item> <item> debug.getinfo </item>
<item> debug.getlocal </item><item> debug.setlocal </item>
<item> debug.sethook </item><item> debug.gethook </item>
<item> assert </item> <item> collectgarbage </item>
<item> dofile </item> <item> error </item>
<item> next </item> <item> print </item>
<item> rawget </item> <item> rawset </item>
<item> tonumber </item> <item> tostring </item>
<item> type </item> <item> _ALERT </item>
<item> _ERRORMESSAGE </item><item> call </item>
<item> getmetatable </item><item> gcinfo </item>
<item> ipairs </item> <item> loadfile </item>
<item> loadstring </item> <item> pairs </item>
<item> pcall </item> <item> require </item>
<item> LUA_PATH </item> <item> setmetatable </item>
<item> _LOADED </item> <item> _VERSION </item>
<item> gettagmethod </item><item> globals </item>
<item> newtag </item> <item> setglobal </item>
<item> settag </item> <item> settagmethod </item>
<item> setlinehook </item> <item> getglobals </item>
<item> copytagmethods </item><item> dostring </item>
<item> getglobal </item> <item> tag </item>
<item> setglobals </item> <item> unpack </item>
<item> exit </item> <item> readfrom </item>
<item> writeto </item> <item> appendto </item>
<item> read </item> <item> write </item>
<item> getinfo </item> <item> getlocal </item>
<item> setlocal </item> <item> setcallhook </item>
<item> tinsert </item> <item> tremove </item>
<item> flush </item> <item> seek </item>
<item> setlocale </item> <item> execute </item>
<item> remove </item> <item> rename </item>
<item> tmpname </item> <item> getenv </item>
<item> getn </item> <item> sort </item>
<item> table.foreach </item> <item> table.foreachi </item>
<item> foreach </item> <item> foreachi </item>
<item> abs </item> <item> sin </item>
<item> cos </item> <item> tan </item>
<item> asin </item> <item> acos </item>
<item> atan </item> <item> atan2 </item>
<item> ceil </item> <item> floor </item>
<item> mod </item> <item> frexp </item>
<item> ldexp </item> <item> squrt </item>
<item> min </item> <item> max </item>
<item> log </item> <item> log10 </item>
<item> exp </item> <item> deg </item>
<item> rad </item> <item> random </item>
<item> randomseed </item> <item> strlen </item>
<item> strsub </item> <item> strlower </item>
<item> strupper </item> <item> strchar </item>
<item> strrep </item> <item> ascii </item>
<item> strbyte </item> <item> format </item>
<item> strfind </item> <item> gsub </item>
<item> openfile </item> <item> closefile </item>
<item> date </item> <item> clock </item>
<item> string.trim </item> <item> string.starts </item>
<item> string.split </item>
<item> table.dump </item> <item> table.copy </item>
<item> table.selective_copy </item> <item> table.merge </item>
<item> toboolean </item>
</list>
<list name="otclient-core-functions">
<item> connect </item>
<item> extends </item>
<item> print </item>
<item> fatal </item>
<item> scheduleEvent </item>
<item> addEvent </item>
<item> removeEvent </item>
<item> displayUI </item>
<item> createWidget </item>
</list>
<list name="attention">
<item> TODO </item>
<item> FIXME </item>
<item> NOTE </item>
</list>
<list name="deprecated">
<item> table.foreach </item> <item> table.foreachi </item>
<item> foreach </item> <item> foreachi </item>
</list>
<contexts>
<context name="Base" attribute="Comment" lineEndContext="Normal">
<RegExpr attribute="Comment" context="Normal" String="#!.*$" column="0" />
<RegExpr attribute="Comment" context="Normal" String="^.*$" lookAhead="true" />
</context>
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
<IncludeRules context="##DoxygenLua" />
<keyword attribute="Error" context="#stay" String="deprecated" />
<DetectSpaces />
<RegExpr attribute="Comment" context="Block Comment" beginRegion="block comment" String="--\[(=*)\[" dynamic="true" />
<Detect2Chars attribute="Comment" context="Comment" char="-" char1="-"/>
<RegExpr attribute="Strings" context="String_block" String="\[(=*)\[" dynamic="true" />
<DetectChar attribute="Strings" context="String_single" char="'"/>
<DetectChar attribute="Strings" context="String_double" char="&quot;"/>
<keyword attribute="Lua Base Func" context="#stay" String="lua-base-functions"/>
<keyword attribute="Otclient Core Func" context="#stay" String="otclient-core-functions" />
<RegExpr attribute="Keyword" context="#stay" beginRegion="chunk" String="\bfunction\b" />
<keyword attribute="Keyword" context="#stay" String="keywords" />
<keyword attribute="Keyword" context="#stay" String="pseudo-variables" />
<RegExpr attribute="Keyword" context="#stay" endRegion="chunk" beginRegion="chunk" String="\belse\b" />
<RegExpr attribute="Keyword" context="#stay" endRegion="chunk" beginRegion="chunk" String="\belseif\b" />
<RegExpr attribute="Keyword" context="#stay" beginRegion="chunk" String="\bdo\b" />
<RegExpr attribute="Keyword" context="#stay" beginRegion="chunk" String="\bif\b" />
<RegExpr attribute="Keyword" context="#stay" endRegion="chunk" String="\bend\b" />
<keyword attribute="Keyword" context="#stay" String="control" />
<DetectChar attribute="Symbols" context="#stay" beginRegion="table" char="{" />
<DetectChar attribute="Symbols" context="#stay" endRegion="table" char="}" />
<RegExpr attribute="Numbers" context="#stay" String="\b\d*\.?\d*(e|e\-|e\+)?\d+\b"/>
<RegExpr attribute="Numbers" context="#stay" String="\b-?0[xX][0-9a-fA-F]+\b"/>
<RegExpr attribute="Normal Text" context="#stay" String="\b[a-zA-Z_][a-zA-Z0-9_]*(?=\s*([({'&quot;]|\[\[))\b" />
<RegExpr attribute="Const" context="#stay" String="\b[A-Z_][A-Z0-9_]*\b" />
<RegExpr attribute="Global Class" context="#stay" String="\b[A-Z_][a-zA-Z0-9_]*\b" />
<RegExpr attribute="Var" context="#stay" String="\b[a-zA-Z_][a-zA-Z0-9_]*\b" />
<Detect2Chars attribute="Error" context="#stay" char="!" char1="="/>
<Detect2Chars attribute="Error" context="#stay" char="-" char1="="/>
<Detect2Chars attribute="Error" context="#stay" char="+" char1="="/>
<Detect2Chars attribute="Error" context="#stay" char="+" char1="+"/>
<Detect2Chars attribute="Error" context="#stay" char="." char1="="/>
<AnyChar attribute="Symbols" context="#stay" String="[]().=~+-*/^&gt;&lt;#;" />
</context>
<context name="Comment" attribute="Comment" lineEndContext="#pop">
<Detect2Chars attribute="Alerts" context="#stay" char="-" char1="-" />
<keyword attribute="Alerts" context="#stay" String="attention"/>
</context>
<context name="Block Comment" attribute="Comment" lineEndContext="#stay" dynamic="true" >
<RegExpr attribute="Comment" context="#pop" endRegion="block comment" String="\]%1\]" dynamic="true" />
<Detect2Chars attribute="Alerts" context="#stay" char="-" char1="-" />
<keyword attribute="Alerts" context="#stay" String="attention" />
</context>
<context name="String_single" attribute="Strings" lineEndContext="Error">
<RegExpr attribute="Symbols" context="#stay" String="\\(a|b|f|n|r|t|v|\\|&quot;|\'|[|])" />
<DetectChar attribute="Strings" context="#pop" char="'"/>
</context>
<context name="String_double" attribute="Strings" lineEndContext="Error">
<RegExpr attribute="Symbols" context="#stay" String="\\[abfnrtv'&quot;\\\[\]]" />
<DetectChar attribute="Strings" context="#pop" char="&quot;"/>
</context>
<context name="String_block" attribute="Strings" lineEndContext="#stay" dynamic="true">
<RegExpr attribute="Symbols" context="#stay" String="\\(a|b|f|n|r|t|v|\\|&quot;|\'|[|])" />
<RegExpr attribute="Strings" context="#pop" String="\]%1\]" dynamic="true" />
</context>
<context name="Error" attribute="Error" lineEndContext="#stay">
</context>
</contexts>
<itemDatas>
<itemData name="Alerts" defStyleNum="dsAlert" />
<itemData name="Comment" defStyleNum="dsComment"/>
<itemData name="Lua Base Func" defStyleNum="dsNormal" color="#0057AE"/>
<itemData name="Otclient Core Func" defStyleNum="dsKeyword" color="#0057AE"/>
<itemData name="Const" defStyleNum="dsNormal" color="#a800ff"/>
<itemData name="Global Class" defStyleNum="dsKeyword" color="#006E28"/>
<itemData name="Keyword" defStyleNum="dsKeyword"/>
<itemData name="Error" defStyleNum="dsError"/>
<itemData name="Normal Text" defStyleNum="dsNormal"/>
<itemData name="Numbers" defStyleNum="dsDecVal"/>
<itemData name="Strings" defStyleNum="dsString"/>
<itemData name="Symbols" defStyleNum="dsOthers"/>
<itemData name="Var" defStyleNum="dsKeyword" color="#5555aa" selColor="#ffffff" bold="0"/>
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="--" />
<comment name="multiLine" start="--[[" end="]]" />
</comments>
<keywords casesensitive="1" weakDeliminator="&#46;" additionalDeliminator="&quot;"/>
</general>
</language>