Damson/assets/syntax/yara.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
3.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="YARA" section="Other" version="5" kateversion="5.62" indenter="cstyle" extensions="*.yar;*.yara" license="MIT"><highlighting><list name="keywords"><item>all</item><item>and</item><item>any</item><item>ascii</item><item>at</item><item>base64</item><item>base64wide</item><item>condition</item><item>contains</item><item>endswith</item><item>entrypoint</item><item>filesize</item><item>for</item><item>fullword</item><item>global</item><item>icontains</item><item>iendswith</item><item>iequals</item><item>import</item><item>in</item><item>include</item><item>int16</item><item>int16be</item><item>int32</item><item>int32be</item><item>int8</item><item>int8be</item><item>istartswith</item><item>matches</item><item>meta</item><item>nocase</item><item>none</item><item>not</item><item>of</item><item>or</item><item>private</item><item>rule</item><item>startswith</item><item>strings</item><item>them</item><item>uint16</item><item>uint16be</item><item>uint32</item><item>uint32be</item><item>uint8</item><item>uint8be</item><item>wide</item><item>xor</item></list><list name="boolean"><item>false</item><item>true</item></list><contexts><context name="Normal" attribute="Normal Text"><keyword String="keywords" attribute="Keyword"/><keyword String="boolean" attribute="Boolean"/><DetectChar char='"' attribute="String" context="String"/><StringDetect String="//" attribute="Comment" context="Comment"/><StringDetect String="/*" attribute="Comment" context="Multiline Comment" beginRegion="Comment"/><RegExpr String="\$\w*" attribute="Identifier" context="#pop"/><RegExpr String="(?&lt;=rule\s)\s*[_a-zA-Z]\w{0,127}" attribute="Rule"/><RegExpr String="(?&lt;=[\]{\(|\)])[\s]*?(?:[\dA-Fa-f?]{2}[\s]*?)+(?=[\(|\)}\[])" attribute="Hex String"/><RegExpr String="/(?=(?:[^/\\\[]|\\.|\[(?:[^\]\\]|\\.)+\])+/(?:[gimsuy]+(?!\s*[\w$])|(?![/\*])|(?=/\*)))" attribute="Start Regular Expression" context="(regex caret first check)##JavaScript"/><DetectChar char="{" attribute="Symbol" beginRegion="block1"/><DetectChar char="}" attribute="Symbol" endRegion="block1"/><Float attribute="Float"/><HlCHex attribute="Hex"/><Int attribute="Decimal"/></context><context name="Comment" attribute="Comment" lineEndContext="#pop"><DetectSpaces/><IncludeRules context="##Comments"/></context><context name="Multiline Comment" attribute="Comment"><DetectSpaces/><StringDetect String="*/" attribute="Comment" context="#pop" endRegion="Comment"/><IncludeRules context="##Comments"/></context><context name="String" attribute="String" lineEndContext="#pop"><LineContinue attribute="String" context="#pop"/><HlCStringChar attribute="String Char"/><DetectChar char='"' attribute="String" context="#pop"/></context></contexts><itemDatas><itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="0"/><itemData name="Rule" defStyleNum="dsFunction" spellChecking="0"/><itemData name="Boolean" defStyleNum="dsConstant" spellChecking="0"/><itemData name="Identifier" defStyleNum="dsVariable" spellChecking="0"/><itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="0"/><itemData name="Hex" defStyleNum="dsBaseN" spellChecking="0"/><itemData name="Hex String" defStyleNum="dsSpecialString" spellChecking="0"/><itemData name="Float" defStyleNum="dsFloat" spellChecking="0"/><itemData name="String" defStyleNum="dsString"/><itemData name="String Char" defStyleNum="dsSpecialChar" spellChecking="0"/><itemData name="Comment" defStyleNum="dsComment"/><itemData name="Symbol" defStyleNum="dsNormal"/><itemData name="Start Regular Expression" defStyleNum="dsSpecialString" spellChecking="0"/></itemDatas></highlighting><general><comments><comment name="singleLine" start="//" position="afterwhitespace"/><comment name="multiLine" start="/*" end="*/" region="Comment"/></comments></general></language>