Damson/assets/syntax/hare.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.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="Hare" section="Sources" version="2" kateversion="5.79" indenter="cstyle" extensions="*.ha" priority="1" author="Akseli Lahtinen ([email protected])" license="MIT"><highlighting><list name="controlflow"><item>break</item><item>case</item><item>continue</item><item>else</item><item>for</item><item>if</item><item>return</item><item>switch</item><item>yield</item></list><list name="keywords"><item>abort</item><item>align</item><item>alloc</item><item>append</item><item>as</item><item>assert</item><item>def</item><item>defer</item><item>delete</item><item>enum</item><item>export</item><item>false</item><item>free</item><item>insert</item><item>is</item><item>len</item><item>match</item><item>null</item><item>offset</item><item>true</item><item>vaarg</item><item>vaend</item><item>valist</item><item>vastart</item></list><list name="types"><item>bool</item><item>done</item><item>f32</item><item>f64</item><item>i16</item><item>i32</item><item>i64</item><item>i8</item><item>int</item><item>rune</item><item>size</item><item>static</item><item>str</item><item>struct</item><item>type</item><item>u16</item><item>u32</item><item>u64</item><item>u8</item><item>uint</item><item>uintptr</item><item>union</item><item>void</item></list><list name="builtins"><item>const</item><item>let</item><item>nullable</item></list><list name="function"><item>fn</item></list><list name="import"><item>use</item></list><contexts><context name="Normal Text" attribute="Normal Text"><StringDetect String="//" attribute="Comment" context="Comment"/><AnyChar String="&#34;'" attribute="String" context="String"/><keyword String="controlflow" attribute="Control Flow"/><keyword String="keywords" attribute="Keyword"/><keyword String="types" attribute="Data Type"/><keyword String="builtins" attribute="Built In"/><RegExpr String="@\w+" attribute="Attribute"/><keyword String="function" attribute="Keyword" context="Function"/><RegExpr String="(\b[0-9]+\\.[0-9]+([eE][+-]?[0-9]+)?(f32|f64)?\b)|(\b[0-9]+([eE][+-]?[0-9]+)?(f32|f64)\b)" attribute="Float"/><RegExpr String="\b[0-9]+([eE][+-]?[0-9]+)?(i|u|z|i8|i16|i32|i64|u8|u16|u32|u64)?\b" attribute="Decimal"/><RegExpr String="\b(0x[0-9a-fA-F]+|0o[0-7]+|0b[01]+)(i|u|z|i8|i16|i32|i64|u8|u16|u32|u64)?\b" attribute="BaseN"/><AnyChar String=":!%&amp;()+,-/.*&lt;=>?[]|~^;" attribute="Operator"/><DetectChar char="{" attribute="Operator" beginRegion="Brace1"/><DetectChar char="}" attribute="Operator" endRegion="Brace1"/><keyword String="import" attribute="Use"/></context><context name="Comment" attribute="Comment" lineEndContext="#pop"><IncludeRules context="##Comments"/></context><context name="Function" attribute="Function" lineEndContext="#pop"><RegExpr String="\s\w{1,}" attribute="Function"/><DetectChar char="\" attribute="Function" context="#pop" lookAhead="1"/></context><context name="String" attribute="String"><AnyChar String="&#34;'" attribute="String" context="#pop"/></context></contexts><itemDatas><itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="0"/><itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="0"/><itemData name="Data Type" defStyleNum="dsDataType" spellChecking="0"/><itemData name="Built In" defStyleNum="dsBuiltIn"/><itemData name="Attribute" defStyleNum="dsAttribute"/><itemData name="Function" defStyleNum="dsFunction"/><itemData name="Operator" defStyleNum="dsOperator"/><itemData name="String" defStyleNum="dsString"/><itemData name="Comment" defStyleNum="dsComment"/><itemData name="Decimal" defStyleNum="dsDecVal"/><itemData name="Float" defStyleNum="dsFloat"/><itemData name="BaseN" defStyleNum="dsBaseN"/><itemData name="Use" defStyleNum="dsImport"/></itemDatas></highlighting><general><comments><comment name="singleLine" start="//" position="afterwhitespace"/></comments></general></language>