Damson/assets/syntax/lua.xml
astar76 11c1a7808b Build the syntax definitions into the app
Highlighting relied on the syntax-highlighting package, so removing it
left every file uncoloured. The 462 definitions now live in assets/syntax
and are compressed into the binary at build time, unpacked per language
when used. User .xml files still add to or replace them, and the licence
each file declares is recorded in assets/syntax/LICENSES.md.

Also moves files to the trash without needing gio.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 20:35:27 -06:00

1 line
No EOL
15 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="Lua" version="21" indenter="cstyle" kateversion="5.79" section="Scripts" extensions="*.lua;*.rockspec" mimetype="text/x-lua"><highlighting><list name="keywords"><item>and</item><item>function</item><item>global</item><item>in</item><item>local</item><item>not</item><item>or</item></list><list name="specialvars"><item>false</item><item>nil</item><item>true</item></list><list name="control"><item>break</item><item>do</item><item>else</item><item>elseif</item><item>end</item><item>for</item><item>goto</item><item>if</item><item>repeat</item><item>return</item><item>then</item><item>until</item><item>while</item></list><list name="startcontrol"><item>do</item><item>if</item><item>repeat</item></list><list name="elsecontrol"><item>else</item><item>elseif</item></list><list name="endcontrol"><item>end</item><item>until</item></list><list name="basevar"><item>LUA_CPATH</item><item>LUA_INIT</item><item>LUA_PATH</item><item>_ENV</item><item>_G</item><item>_PROMPT</item><item>_PROMPT2</item><item>_VERSION</item><item>math.maxinteger</item><item>math.mininteger</item><item>math.pi</item><item>package.config</item><item>package.cpath</item><item>package.loaded</item><item>package.path</item><item>package.preload</item><item>package.searchers</item><item>utf8.charpattern</item></list><list name="basefunc"><item>assert</item><item>byte</item><item>cgilua</item><item>cgilua.addclosefunction</item><item>cgilua.addopenfunction</item><item>cgilua.addscripthandler</item><item>cgilua.buildprocesshandler</item><item>cgilua.contentheader</item><item>cgilua.cookies</item><item>cgilua.cookies.delete</item><item>cgilua.cookies.get</item><item>cgilua.cookies.set</item><item>cgilua.cookies.sethtml</item><item>cgilua.doif</item><item>cgilua.doscript</item><item>cgilua.errorlog</item><item>cgilua.handlelp</item><item>cgilua.header</item><item>cgilua.htmlheader</item><item>cgilua.lp.compile</item><item>cgilua.lp.include</item><item>cgilua.lp.setcompatmode</item><item>cgilua.lp.setoutfunc</item><item>cgilua.lp.translate</item><item>cgilua.mkabsoluteurl</item><item>cgilua.mkurlpath</item><item>cgilua.pack</item><item>cgilua.put</item><item>cgilua.redirect</item><item>cgilua.script_file</item><item>cgilua.script_path</item><item>cgilua.script_pdir</item><item>cgilua.script_vdir</item><item>cgilua.script_vpath</item><item>cgilua.serialize</item><item>cgilua.servervariable</item><item>cgilua.session</item><item>cgilua.session.close</item><item>cgilua.session.data</item><item>cgilua.session.delete</item><item>cgilua.session.load</item><item>cgilua.session.new</item><item>cgilua.session.open</item><item>cgilua.session.save</item><item>cgilua.session.setsessiondir</item><item>cgilua.seterrorhandler</item><item>cgilua.seterroroutput</item><item>cgilua.setmaxfilesize</item><item>cgilua.setmaxinput</item><item>cgilua.setoutfunc</item><item>cgilua.splitpath</item><item>cgilua.urlcode.encodetable</item><item>cgilua.urlcode.escape</item><item>cgilua.urlcode.insertfield</item><item>cgilua.urlcode.parsequery</item><item>cgilua.urlcode.unescape</item><item>cgilua.urlpath</item><item>char</item><item>close</item><item>collectgarbage</item><item>commit</item><item>concat</item><item>connect</item><item>coroutine.close</item><item>coroutine.create</item><item>coroutine.isyieldable</item><item>coroutine.resume</item><item>coroutine.running</item><item>coroutine.status</item><item>coroutine.wrap</item><item>coroutine.yield</item><item>debug.debug</item><item>debug.gethook</item><item>debug.getinfo</item><item>debug.getlocal</item><item>debug.getmetatable</item><item>debug.getregistry</item><item>debug.getupvalue</item><item>debug.getuservalue</item><item>debug.sethook</item><item>debug.setlocal</item><item>debug.setmetatable</item><item>debug.setupvalue</item><item>debug.setuservalue</item><item>debug.traceback</item><item>debug.upvalueid</item><item>debug.upvaluejoin</item><item>dofile</item><item>dump</item><item>error</item><item>escape</item><item>execute</item><item>fetch</item><item>files</item><item>find</item><item>flush</item><item>format</item><item>getcolnames</item><item>getcoltypes</item><item>getlastautoid</item><item>getmetatable</item><item>gmatch</item><item>gsub</item><item>insert</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.popen</item><item>io.read</item><item>io.stderr</item><item>io.stdin</item><item>io.stdout</item><item>io.tmpfile</item><item>io.type</item><item>io.write</item><item>ipairs</item><item>len</item><item>lfs</item><item>lfs.attributes</item><item>lfs.chdir</item><item>lfs.currentdir</item><item>lfs.dir</item><item>lfs.lock</item><item>lfs.mkdir</item><item>lfs.rmdir</item><item>lfs.touch</item><item>lfs.unlock</item><item>lines</item><item>load</item><item>loadfile</item><item>lower</item><item>match</item><item>math.abs</item><item>math.acos</item><item>math.asin</item><item>math.atan</item><item>math.ceil</item><item>math.cos</item><item>math.deg</item><item>math.exp</item><item>math.floor</item><item>math.fmod</item><item>math.huge</item><item>math.log</item><item>math.max</item><item>math.min</item><item>math.modf</item><item>math.rad</item><item>math.random</item><item>math.randomseed</item><item>math.sin</item><item>math.sqrt</item><item>math.tan</item><item>math.tointeger</item><item>math.type</item><item>math.utl</item><item>move</item><item>next</item><item>numrows</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>pack</item><item>package.loadlib</item><item>package.searchpath</item><item>packsize</item><item>pairs</item><item>pcall</item><item>print</item><item>rawequal</item><item>rawget</item><item>rawlen</item><item>rawset</item><item>read</item><item>remove</item><item>rep</item><item>require</item><item>reverse</item><item>rollback</item><item>seek</item><item>select</item><item>setautocommit</item><item>setmetatable</item><item>setvbuf</item><item>sort</item><item>string.byte</item><item>string.char</item><item>string.dump</item><item>string.find</item><item>string.format</item><item>string.gmatch</item><item>string.gsub</item><item>string.len</item><item>string.lower</item><item>string.match</item><item>string.pack</item><item>string.packsize</item><item>string.rep</item><item>string.reverse</item><item>string.sub</item><item>string.unpack</item><item>string.upper</item><item>sub</item><item>table.concat</item><item>table.create</item><item>table.insert</item><item>table.move</item><item>table.pack</item><item>table.remove</item><item>table.sort</item><item>table.unpack</item><item>tonumber</item><item>tostring</item><item>type</item><item>unpack</item><item>upper</item><item>utf8.char</item><item>utf8.codepoint</item><item>utf8.codes</item><item>utf8.len</item><item>utf8.offset</item><item>warn</item><item>write</item><item>xpcall</item><item>zip</item><item>zip.open</item><item>zip.openfile</item></list><list name="metamethod"><item>__add</item><item>__band</item><item>__bnot</item><item>__bor</item><item>__bxor</item><item>__call</item><item>__close</item><item>__concat</item><item>__div</item><item>__eq</item><item>__gc</item><item>__idiv</item><item>__index</item><item>__le</item><item>__len</item><item>__lt</item><item>__metatable</item><item>__mod</item><item>__mode</item><item>__mul</item><item>__name</item><item>__newindex</item><item>__pairs</item><item>__pow</item><item>__shl</item><item>__shr</item><item>__sub</item><item>__tostring</item><item>__unm</item></list><list name="deprecated"><item>_ALERT</item><item>_ERRORMESSAGE</item><item>_LOADED</item><item>__ipairs</item><item>foreach</item><item>foreachi</item><item>loadstring</item><item>math.atan2</item><item>math.cosh</item><item>math.frexp</item><item>math.ldexp</item><item>math.log10</item><item>math.mod</item><item>math.pow</item><item>math.sinh</item><item>math.tanh</item><item>string.gfind</item><item>table.foreach</item><item>table.foreachi</item><item>table.getn</item><item>table.setn</item></list><contexts><context name="Normal" attribute="Normal Text"><StringDetect String="#!" attribute="Comment" context="ShebangLine" column="0"/><DetectSpaces/><keyword String="deprecated" attribute="Deprecated"/><StringDetect String="--" attribute="Comment" context="MatchComment" lookAhead="1"/><RegExpr String="\[(=*)\[" attribute="RawStrings" context="String_block"/><DetectChar char="'" attribute="Strings" context="String_single"/><DetectChar char='"' attribute="Strings" context="String_double"/><keyword String="basefunc" attribute="BFunc"/><keyword String="metamethod" attribute="Metamethod"/><keyword String="basevar" attribute="BVar"/><WordDetect String="function" attribute="Keyword" context="Function" beginRegion="chunk"/><WordDetect String="local" attribute="Keyword" context="Local"/><keyword String="keywords" attribute="Keyword"/><keyword String="specialvars" attribute="Special Variable" additionalDeliminator="."/><WordDetect String="self" attribute="Self Variable" additionalDeliminator="."/><keyword String="startcontrol" attribute="Control" context="StartControl" beginRegion="chunk"/><keyword String="control" attribute="Control"/><DetectChar char="{" attribute="Symbols" beginRegion="table"/><DetectChar char="}" attribute="Symbols" endRegion="table"/><RegExpr String="[a-zA-Z_][a-zA-Z0-9_]*(?=\s*([({'&#34;]|\[\[|\[=))" attribute="Normal Text"/><RegExpr String="[A-Z_][A-Z0-9_]*\b" attribute="Constant"/><DetectIdentifier attribute="Variable"/><RegExpr String="(?:0[xX](?:\.[0-9A-Fa-f]+|[0-9A-Fa-f]+\.?[0-9A-Fa-f]*)(?:[pP][-+]?\d*)?|(?:\.\d+|\d+\.?\d*)(?:[eE][-+]?\d*)?)" attribute="Numbers" context="NumberSuffix"/><StringDetect String="!=" attribute="Error"/><StringDetect String="-=" attribute="Error"/><StringDetect String="+=" attribute="Error"/><StringDetect String="++" attribute="Error"/><StringDetect String=".=" attribute="Error"/><AnyChar String=":[]().,=~+-*/%&amp;|^>&lt;#;" attribute="Symbols"/></context><context name="MatchComment" attribute="Normal Text" fallthroughContext="#pop" lineEndContext="#pop"><IncludeRules context="##DoxygenLua"/><RegExpr String="--\[(=*)\[" attribute="Comment" context="#pop!BlockComment" beginRegion="BlockComment"/><StringDetect String="--" attribute="Comment" context="#pop!Comment"/></context><context name="Comment" attribute="Comment" lineEndContext="#pop"><DetectSpaces/><IncludeRules context="##Comments"/><DetectIdentifier/></context><context name="Function" attribute="Normal Text"><WordDetect String="end" attribute="Keyword" context="#pop" endRegion="chunk"/><IncludeRules context="Normal"/></context><context name="LocalVariable" attribute="Normal Text" fallthroughContext="#pop#pop" lineEndContext="#pop#pop"><DetectSpaces/><StringDetect String="--" attribute="Comment" context="MatchComment" lookAhead="1"/><DetectChar char="," attribute="Symbols" context="#pop"/><DetectChar char="&lt;" attribute="Attribute" context="Attribute" lookAhead="1"/></context><context name="Special_char" attribute="Error" lineEndContext="#pop"><LineContinue attribute="Special Char" context="#pop"/><StringDetect String="\z" attribute="Special Char" context="Special_char_\z" lookAhead="1"/><RegExpr String="\\(?:[abfnrtv'&#34;\\\[\]]|x[0-9A-Fa-f][0-9A-Fa-f]|\d{1,3}|u\{[0-9A-Fa-f]{1,6}\})" attribute="Special Char" context="#pop"/><DetectChar char="\" attribute="Error" context="#pop"/></context><context name="UnclosedString" attribute="Error" fallthroughContext="#pop#pop"><DetectSpaces attribute="Error" context="#pop#pop"/><DetectIdentifier attribute="Error" context="#pop#pop"/><RegExpr String="^([^-[()&#34;'\s]|-(?!-)|\[(?!=))+" attribute="Error" context="#pop#pop" column="0"/></context><context name="Attribute" attribute="Attribute" lineEndContext="#pop"><RegExpr String="&lt;\s*(?:close|const)\s*>" attribute="Attribute" context="#pop"/><RegExpr String="&lt;\s*\w*\s*>?" attribute="Error" context="#pop"/></context><context name="BlockComment" attribute="Comment"><IncludeRules context="Comment"/><StringDetect String="]%1]" attribute="Comment" context="#pop" endRegion="BlockComment" dynamic="1"/></context><context name="Local" attribute="Normal Text" fallthroughContext="#pop" lineEndContext="#pop"><DetectSpaces/><WordDetect String="function" attribute="Keyword" context="#pop!Function" beginRegion="chunk"/><StringDetect String="--" attribute="Comment" context="MatchComment" lookAhead="1"/><RegExpr String="\b[A-Z_][A-Z0-9_]*\b" attribute="Constant" context="LocalVariable"/><DetectIdentifier attribute="Variable" context="LocalVariable"/></context><context name="NumberSuffix" attribute="Normal Text" fallthroughContext="#pop" lineEndContext="#pop"><DetectIdentifier attribute="Error" context="#pop"/></context><context name="ShebangLine" attribute="Comment" lineEndContext="#pop"/><context name="Special_char_\z" attribute="Special Char"><LineContinue char="z" attribute="Special Char" context="#pop#pop"/><DetectChar char="z" attribute="Special Char" context="#pop#pop"/></context><context name="StartControl" attribute="Normal Text"><keyword String="elsecontrol" attribute="Control" beginRegion="chunk" endRegion="chunk"/><keyword String="endcontrol" attribute="Control" context="#pop" endRegion="chunk"/><IncludeRules context="Normal"/></context><context name="String_block" attribute="RawStrings"><StringDetect String="]%1]" attribute="RawStrings" context="#pop" dynamic="1"/></context><context name="String_double" attribute="Strings" lineEndContext="UnclosedString"><DetectChar char="\" attribute="Strings" context="Special_char" lookAhead="1"/><DetectChar char='"' attribute="Strings" context="#pop"/></context><context name="String_single" attribute="Strings" lineEndContext="UnclosedString"><DetectChar char="\" attribute="Strings" context="Special_char" lookAhead="1"/><DetectChar char="'" attribute="Strings" context="#pop"/></context></contexts><itemDatas><itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Metamethod" defStyleNum="dsBuiltIn" spellChecking="0"/><itemData name="BFunc" defStyleNum="dsFunction" spellChecking="0"/><itemData name="BVar" defStyleNum="dsVariable" spellChecking="0"/><itemData name="Comment" defStyleNum="dsComment"/><itemData name="Constant" defStyleNum="dsConstant" spellChecking="0"/><itemData name="Control" defStyleNum="dsControlFlow" spellChecking="0"/><itemData name="Error" defStyleNum="dsError" spellChecking="0"/><itemData name="Deprecated" defStyleNum="dsError" spellChecking="0"/><itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="0"/><itemData name="Special Variable" defStyleNum="dsKeyword" spellChecking="0"/><itemData name="Numbers" defStyleNum="dsDecVal" spellChecking="0"/><itemData name="Special Char" defStyleNum="dsSpecialChar" spellChecking="0"/><itemData name="Strings" defStyleNum="dsString"/><itemData name="RawStrings" defStyleNum="dsVerbatimString"/><itemData name="Symbols" defStyleNum="dsOperator" spellChecking="0"/><itemData name="Variable" defStyleNum="dsVariable" spellChecking="0"/><itemData name="Self Variable" defStyleNum="dsVariable" spellChecking="0"/><itemData name="Attribute" defStyleNum="dsAttribute" spellChecking="0"/></itemDatas></highlighting><general><comments><comment name="singleLine" start="--"/><comment name="multiLine" start="--[[" end="]]" region="BlockComment"/></comments><keywords casesensitive="1" weakDeliminator="." additionalDeliminator="'&#34;#"/></general></language>