Damson/assets/syntax/pioasm.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
7.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="PIO Assembler" section="Assembler" extensions="*.pio" version="1" kateversion="5.79" author="Dale Cook ([email protected])" license="MIT"><highlighting><list name="Directives"><item>.clock_div</item><item>.define</item><item>.fifo</item><item>.in</item><item>.lang_opt</item><item>.mov_status</item><item>.origin</item><item>.out</item><item>.pio_version</item><item>.program</item><item>.set</item><item>.side_set</item><item>.word</item><item>.wrap</item><item>.wrap_target</item></list><list name="Instructions"><item>in</item><item>irq</item><item>jmp</item><item>mov</item><item>nop</item><item>out</item><item>pull</item><item>push</item><item>set</item><item>wait</item></list><list name="Registers"><item>isr</item><item>osr</item><item>x</item><item>y</item></list><list name="Keywords"><item>auto</item><item>block</item><item>c-sdk</item><item>clear</item><item>exec</item><item>gpio</item><item>ifempty</item><item>iffull</item><item>irq</item><item>left</item><item>next</item><item>noblock</item><item>nowait</item><item>null</item><item>opt</item><item>osre</item><item>pc</item><item>pin</item><item>pindirs</item><item>pins</item><item>prev</item><item>public</item><item>python</item><item>rel</item><item>right</item><item>rxfifo</item><item>set</item><item>status</item><item>txfifo</item><item>wait</item></list><contexts><context name="Normal" attribute="Normal Text" fallthroughContext="Unknown Normal"><DetectSpaces/><keyword String="Directives" attribute="Directive" context="Directive" insensitive="1"/><StringDetect String="public" attribute="Keyword" context="Public" insensitive="1"/><keyword String="Instructions" attribute="Instruction" context="Instruction" insensitive="1"/><DetectChar char=";" attribute="Comment" context="Line Comment"/><StringDetect String="//" attribute="Comment" context="Line Comment"/><StringDetect String="/*" attribute="Comment" context="Block Comment" beginRegion="Block Comment"/><DetectChar char="%" attribute="Symbol" context="Pass Through" beginRegion="Pass Through"/><DetectIdentifier attribute="Label" context="Label Definition"/></context><context name="Block Comment" attribute="Comment"><IncludeRules context="##Comments"/><StringDetect String="*/" attribute="Comment" context="#pop" endRegion="Block Comment"/></context><context name="Comment" attribute="Normal Text" lineEndContext="#pop"><DetectChar char=";" attribute="Comment" context="#pop!Line Comment"/><StringDetect String="//" attribute="Comment" context="#pop!Line Comment"/><StringDetect String="/*" attribute="Comment" context="Block Comment" beginRegion="Block Comment"/></context><context name="Value" attribute="Normal Text"><DetectChar char="(" attribute="Symbol" context="Expression"/><HlCHex attribute="Hex"/><RegExpr String="\b0[bB][01]+" attribute="Binary"/><Int attribute="Decimal"/><DetectIdentifier attribute="Identifier"/></context><context name="Line Comment" attribute="Comment" lineEndContext="#pop"><IncludeRules context="##Comments"/></context><context name="End Pass Through" attribute="Normal Text"><StringDetect String="%}" attribute="Symbol" context="#pop" endRegion="Pass Through" column="0"/></context><context name="Delay" attribute="Normal Text" lineEndContext="#pop"><DetectSpaces/><StringDetect String="/*" attribute="Comment" context="Block Comment" beginRegion="Block Comment"/><DetectChar char="]" attribute="Symbol" context="#pop!Comment"/><AnyChar String="+-*/:&lt;>" attribute="Symbol"/><IncludeRules context="Value"/></context><context name="Instruction" attribute="Normal Text" lineEndContext="#pop"><DetectSpaces/><StringDetect String="side" attribute="Keyword" context="#pop!Side Set" insensitive="1"/><DetectChar char="[" attribute="Symbol" context="#pop!Delay"/><keyword String="Keywords" attribute="Keyword" insensitive="1"/><keyword String="Registers" attribute="Register" insensitive="1"/><AnyChar String="~!=-:," attribute="Symbol"/><IncludeRules context="Comment"/><IncludeRules context="Value"/></context><context name="Label Definition" attribute="Normal Text"><DetectSpaces/><StringDetect String="/*" attribute="Comment" context="Block Comment" beginRegion="Block Comment"/><DetectChar char=":" attribute="Symbol" context="#pop!Label"/></context><context name="Directive" attribute="Normal Text" lineEndContext="#pop"><keyword String="Keywords" attribute="Keyword" insensitive="1"/><IncludeRules context="Comment"/><IncludeRules context="Value"/></context><context name="Expression" attribute="Normal Text" lineEndContext="#pop"><DetectSpaces/><DetectChar char=")" attribute="Symbol" context="#pop"/><StringDetect String="/*" attribute="Comment" context="Block Comment" beginRegion="Block Comment"/><AnyChar String="+-*/:&lt;>" attribute="Symbol"/><IncludeRules context="Value"/></context><context name="Label" attribute="Normal Text" lineEndContext="#pop"><DetectSpaces/><keyword String="Instructions" attribute="Instruction" context="#pop!Instruction" insensitive="1"/><IncludeRules context="Comment"/></context><context name="Normal C" attribute="Normal Text"><IncludeRules context="End Pass Through"/><IncludeRules context="Normal##C"/></context><context name="Normal Python" attribute="Normal Text"><IncludeRules context="End Pass Through"/><IncludeRules context="Normal##Python"/></context><context name="Pass Through" attribute="Normal Text" fallthroughContext="#pop!Unknown Pass Through"><RegExpr String="\s*c-sdk\s*{" context="#pop!Pass Through C" lookAhead="1"/><RegExpr String="\s*python\s*{" context="#pop!Pass Through Python" lookAhead="1"/></context><context name="Pass Through C" attribute="Keyword"><DetectSpaces attribute="Normal Text"/><DetectChar char="{" attribute="Symbol" context="#pop!Normal C"/></context><context name="Pass Through Python" attribute="Keyword"><DetectSpaces attribute="Normal Text"/><DetectChar char="{" attribute="Symbol" context="#pop!Normal Python"/></context><context name="Public" attribute="Normal Text" lineEndContext="#pop"><DetectSpaces/><StringDetect String="/*" attribute="Comment" context="Block Comment" beginRegion="Block Comment"/><DetectIdentifier attribute="Label" context="Label Definition"/></context><context name="Side Set" attribute="Normal Text" lineEndContext="#pop"><DetectSpaces/><DetectChar char="[" attribute="Symbol" context="#pop!Delay"/><IncludeRules context="Comment"/><IncludeRules context="Value"/></context><context name="Unknown Normal" attribute="Normal Text" lineEndContext="#pop"/><context name="Unknown Pass Through" attribute="Identifier" lineEndContext="#pop"><DetectSpaces attribute="Normal Text"/><DetectChar char="{" attribute="Symbol" context="#pop!End Pass Through"/></context></contexts><itemDatas><itemData name="Normal Text" defStyleNum="dsNormal"/><itemData name="Directive" defStyleNum="dsPreprocessor"/><itemData name="Keyword" defStyleNum="dsKeyword"/><itemData name="Register" defStyleNum="dsKeyword"/><itemData name="Label" defStyleNum="dsFunction"/><itemData name="Instruction" defStyleNum="dsKeyword"/><itemData name="Identifier" defStyleNum="dsVariable"/><itemData name="Symbol" defStyleNum="dsOperator"/><itemData name="Comment" defStyleNum="dsComment"/><itemData name="Hex" defStyleNum="dsBaseN"/><itemData name="Binary" defStyleNum="dsBaseN"/><itemData name="Decimal" defStyleNum="dsDecVal"/></itemDatas></highlighting><general><comments><comment name="singleLine" start=";" position="afterwhitespace"/><comment name="multiLine" start="/*" end="*/" region="Block Comment"/></comments><keywords casesensitive="0" weakDeliminator="."/></general></language>