Damson/assets/syntax/gn.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
5.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="GN" section="Other" version="1" kateversion="5.62" extensions="*.gn;*.gni;.gn" mimetype="text/x-gn" priority="5" license="MIT" author="BogDan Vatra ([email protected])"><highlighting><list name="controlFlow"><item>else</item><item>foreach</item><item>if</item></list><list name="booleans"><item>false</item><item>true</item></list><list name="targetFunctions"><item>action</item><item>action_foreach</item><item>bundle_data</item><item>config</item><item>copy</item><item>executable</item><item>generated_file</item><item>group</item><item>loadable_module</item><item>pool</item><item>rust_library</item><item>rust_proc_macro</item><item>shared_library</item><item>source_set</item><item>static_library</item><item>target</item><item>toolchain</item></list><list name="builtinFunctions"><item>assert</item><item>declare_args</item><item>defined</item><item>exec_script</item><item>filter_exclude</item><item>filter_include</item><item>forward_variables_from</item><item>get_label_info</item><item>get_path_info</item><item>get_target_outputs</item><item>getenv</item><item>import</item><item>mark_used</item><item>mark_used_from</item><item>not_needed</item><item>print</item><item>process_file_template</item><item>propagates_configs</item><item>read_file</item><item>rebase_path</item><item>set_default_toolchain</item><item>set_defaults</item><item>split_list</item><item>string_join</item><item>string_replace</item><item>string_split</item><item>template</item><item>tool</item><item>write_file</item></list><list name="builtinVariables"><item>arg_file_template</item><item>build_file_extension</item><item>buildconfig</item><item>check_system_includes</item><item>check_targets</item><item>current_cpu</item><item>current_os</item><item>current_toolchain</item><item>default_args</item><item>default_toolchain</item><item>exec_script_allowlist</item><item>exec_script_whitelist</item><item>export_compile_commands</item><item>gn_version</item><item>host_cpu</item><item>host_os</item><item>invoker</item><item>ninja_required_version</item><item>no_check_targets</item><item>no_stamp_files</item><item>python_path</item><item>root</item><item>root_build_dir</item><item>root_gen_dir</item><item>root_out_dir</item><item>root_patterns</item><item>script_executable</item><item>secondary_source</item><item>target_cpu</item><item>target_gen_dir</item><item>target_name</item><item>target_os</item><item>target_out_dir</item></list><contexts><context name="Normal" attribute="Normal Text"><DetectSpaces/><RegExpr String="[a-zA-Z_][a-zA-Z0-9_]*(?=\s*[+\-]?=(?!=))" attribute="Property"/><keyword String="controlFlow" attribute="Control Flow"/><keyword String="booleans" attribute="Boolean"/><keyword String="targetFunctions" attribute="Target Function"/><keyword String="builtinFunctions" attribute="Builtin Function"/><keyword String="builtinVariables" attribute="Builtin Variable"/><Int attribute="Integer"/><DetectChar char="#" attribute="Comment" context="Comment"/><DetectChar char='"' attribute="String" context="String"/><DetectChar char="{" attribute="Normal Text" beginRegion="Block"/><DetectChar char="}" attribute="Normal Text" endRegion="Block"/><DetectChar char="[" attribute="Normal Text" context="List" beginRegion="List"/><StringDetect String="&amp;&amp;" attribute="Operator"/><StringDetect String="||" attribute="Operator"/><StringDetect String="==" attribute="Operator"/><StringDetect String="!=" attribute="Operator"/><StringDetect String="&lt;=" attribute="Operator"/><StringDetect String=">=" attribute="Operator"/><StringDetect String="+=" attribute="Operator"/><StringDetect String="-=" attribute="Operator"/><AnyChar String="=+-!&lt;>" attribute="Operator"/></context><context name="Comment" attribute="Comment" lineEndContext="#pop"><IncludeRules context="##Alerts"/><IncludeRules context="##Modelines"/></context><context name="Interpolation" attribute="Normal Text" lineEndContext="#pop#pop"><DetectSpaces/><DetectChar char="}" attribute="Interpolation" context="#pop"/></context><context name="List" attribute="Normal Text" noIndentationBasedFolding="1"><DetectSpaces/><DetectChar char="]" attribute="Normal Text" context="#pop" endRegion="List"/><IncludeRules context="Normal"/></context><context name="String" attribute="String" lineEndContext="#pop"><HlCStringChar attribute="Escape"/><StringDetect String="\$" attribute="Escape"/><StringDetect String="${" attribute="Interpolation" context="Interpolation"/><RegExpr String="\$[a-zA-Z_][a-zA-Z0-9_]*" attribute="Interpolation"/><DetectChar char='"' attribute="String" context="#pop"/></context></contexts><itemDatas><itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Property" defStyleNum="dsDataType" spellChecking="0"/><itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="0"/><itemData name="Boolean" defStyleNum="dsConstant" spellChecking="0"/><itemData name="Target Function" defStyleNum="dsFunction" spellChecking="0"/><itemData name="Builtin Function" defStyleNum="dsBuiltIn" spellChecking="0"/><itemData name="Builtin Variable" defStyleNum="dsVariable" spellChecking="0"/><itemData name="Integer" defStyleNum="dsDecVal" spellChecking="0"/><itemData name="Operator" defStyleNum="dsOperator" spellChecking="0"/><itemData name="String" defStyleNum="dsString"/><itemData name="Escape" defStyleNum="dsSpecialChar" spellChecking="0"/><itemData name="Interpolation" defStyleNum="dsSpecialString" spellChecking="0"/><itemData name="Comment" defStyleNum="dsComment"/></itemDatas></highlighting></language>