Damson/assets/syntax/grammar.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
4.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="KDev-PG[-Qt] Grammar" version="4" kateversion="5.79" section="Sources" extensions="*.g" author="Milian Wolff ([email protected]), Jonathan Schmidt-Dominé ([email protected])" license=""><highlighting><list name="macros"><item>&lt;</item><item>></item><item>ast_base</item><item>ast_extra_members</item><item>ast_header</item><item>bin</item><item>export_macro</item><item>export_macro_header</item><item>left</item><item>namespace</item><item>paren</item><item>parser_base</item><item>parser_bits_header</item><item>parser_declaration_header</item><item>parserclass</item><item>post</item><item>pre</item><item>right</item><item>tern</item><item>token</item><item>token_stream</item></list><list name="keywords"><item>catch</item><item>try/recover</item><item>try/rollback</item></list><list name="access"><item>private</item><item>protected</item><item>public</item></list><list name="locations"><item>constructor</item><item>declaration</item><item>destructor</item></list><contexts><context name="Normal" attribute="Normal Text"><DetectChar char="%" attribute="Keyword" context="Macros" firstNonSpace="1"/><keyword String="keywords" attribute="Keyword"/><keyword String="access" attribute="Access"/><keyword String="locations" attribute="Location"/><Float attribute="Float"/><Int attribute="Decimal"/><DetectChar char='"' attribute="String" context="String"/><StringDetect String="--" attribute="Comment" context="SingleLineComment"/><StringDetect String="[:" attribute="Code Segment" context="CodeSegment" beginRegion="code"/><RegExpr String="\b[A-Z_]+\b" attribute="Token"/><RegExpr String="\b[a-z]+\b(?!=)" attribute="AstNode" insensitive="1"/><DetectChar char="=" attribute="Symbol" context="MemberAst"/><StringDetect String="->" attribute="Symbol" context="AstDecl"/><AnyChar String=";[()]->|=*#@:?" attribute="Symbol"/></context><context name="AstDecl" attribute="Error"><DetectSpaces attribute="Normal Text"/><DetectIdentifier attribute="AstNode"/><DetectChar char="[" attribute="Symbol" context="AstMemberDecl"/><StringDetect String=";;" attribute="Symbol" context="#pop"/></context><context name="AstMemberDecl" attribute="Normal Text"><DetectSpaces/><RegExpr String="\b(member|temporary)\s+variable\b" attribute="Keyword"/><DetectIdentifier attribute="AstMember"/><DetectChar char=":" attribute="Symbol" context="AstMemberType"/><DetectChar char="]" attribute="Symbol" context="#pop"/></context><context name="AstMemberType" attribute="Normal Text"><DetectIdentifier attribute="AstMemberType"/><DetectChar char=";" attribute="Symbol" context="#pop"/></context><context name="CodeSegment" attribute="Code Segment"><StringDetect String=":]" attribute="Code Segment" context="#pop" endRegion="code"/><IncludeRules context="##C++"/></context><context name="Macros" attribute="Keyword" fallthroughContext="#pop"><keyword String="macros" attribute="Keyword"/><StringDetect String="[:" attribute="Normal Text" context="#pop" lookAhead="1"/><StringDetect String=";;" attribute="Keyword" context="#pop"/></context><context name="MemberAst" attribute="AstNode" lineEndContext="#pop"><DetectSpaces/><RegExpr String="\b[A-Z_]+\b" attribute="Token" context="#pop"/><DetectIdentifier attribute="AstNode" context="#pop"/></context><context name="SingleLineComment" attribute="Comment" lineEndContext="#pop"><DetectSpaces/><IncludeRules context="##Comments"/></context><context name="String" attribute="String"><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="Access" defStyleNum="dsDataType" spellChecking="0"/><itemData name="Location" defStyleNum="dsOthers" spellChecking="0"/><itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="0"/><itemData name="Float" defStyleNum="dsFloat" spellChecking="0"/><itemData name="String" defStyleNum="dsString"/><itemData name="String Char" defStyleNum="dsChar" spellChecking="0"/><itemData name="Comment" defStyleNum="dsComment"/><itemData name="Symbol" defStyleNum="dsOthers"/><itemData name="Code Segment" defStyleNum="dsFunction"/><itemData name="Token" defStyleNum="dsKeyword" spellChecking="0"/><itemData name="AstNode" defStyleNum="dsFunction" spellChecking="0"/><itemData name="Error" defStyleNum="dsError" spellChecking="0"/><itemData name="AstMember" defStyleNum="dsNormal" spellChecking="0"/><itemData name="AstMemberType" defStyleNum="dsDataType" spellChecking="0"/></itemDatas></highlighting><general><comments><comment name="singleLine" start="--"/></comments><keywords casesensitive="1" weakDeliminator="/"/></general></language>