Damson/assets/syntax/stan.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="Stan" section="Scientific" version="8" kateversion="5.62" indenter="cstyle" extensions="*.stan;*.stanfunctions" license="MIT"><highlighting><list name="controlflow"><item>break</item><item>continue</item><item>else</item><item>for</item><item>if</item><item>in</item><item>profile</item><item>return</item><item>while</item></list><list name="keywords"><item>algebra_solver</item><item>fatal_error</item><item>integrate_ode</item><item>integrate_ode_bdf</item><item>integrate_ode_rk45</item><item>print</item><item>reject</item></list><list name="types"><item>array</item><item>cholesky_factor_corr</item><item>cholesky_factor_cov</item><item>column_stochastic_matrix</item><item>complex</item><item>complex_matrix</item><item>complex_row_vector</item><item>complex_vector</item><item>corr_matrix</item><item>cov_matrix</item><item>int</item><item>lower</item><item>matrix</item><item>multiplier</item><item>offset</item><item>ordered</item><item>positive_ordered</item><item>real</item><item>row_stochastic_matrix</item><item>row_vector</item><item>simplex</item><item>sum_to_zero_vector</item><item>tuple</item><item>unit_vector</item><item>upper</item><item>vector</item><item>void</item></list><contexts><context name="Normal" attribute="Normal Text"><DetectSpaces/><DetectChar char="#" attribute="Comment" context="Hash comment"/><StringDetect String="//" attribute="Comment" context="C-style comment"/><StringDetect String="/*" attribute="Comment" context="Block comment" beginRegion="Comment"/><RegExpr String="\b(target|jacobian)\s*\+=" attribute="Keyword"/><DetectChar char="&lt;" attribute="Operator" context="After less-than"/><DetectChar char="," attribute="Punctuation" context="After comma"/><DetectChar char=")" attribute="Operator" context="After Right Paren"/><RegExpr String="\b(functions|(transformed\s+)?(data|parameters)|model|generated\s+quantities)\b" attribute="Keyword"/><keyword String="controlflow" attribute="Control Flow"/><keyword String="keywords" attribute="Keyword"/><keyword String="types" attribute="Data Type"/><RegExpr String="[A-Za-z][A-Za-z0-9_]*" attribute="Identifier"/><RegExpr String="(\d+(\.\d+)?|\.\d+)([eE][+-]?\d+)?i" attribute="Complex"/><Float attribute="Real"/><Int attribute="Int"/><DetectChar char="{" attribute="Punctuation" beginRegion="Brace1"/><DetectChar char="}" attribute="Punctuation" endRegion="Brace1"/><DetectChar char='"' attribute="String" context="String"/><RegExpr String="([+-]?=|\.?[*/]=)" attribute="Assignment"/><RegExpr String="(:|\?|\|\||&amp;&amp;|==|!=|&lt;=?|>=?|\+|-|\.?\*|\.?/|%|\\|'|^)" attribute="Operator"/><AnyChar String="[]()" attribute="Punctuation"/></context><context name="Upper Bound" attribute="Normal Text"><StringDetect String="upper" attribute="Keyword"/><DetectChar char="=" attribute="Punctuation" context="#pop"/></context><context name="After Right Paren" attribute="Normal Text" fallthroughContext="#pop"><DetectSpaces/><RegExpr String="T\s*\[" context="Truncation" lookAhead="1"/></context><context name="After comma" attribute="Normal Text" fallthroughContext="#pop"><DetectSpaces/><RegExpr String="upper\s*=" context="Upper Bound" lookAhead="1"/></context><context name="After less-than" attribute="Normal Text" fallthroughContext="#pop"><DetectSpaces/><RegExpr String="upper\s*=" context="Upper Bound" lookAhead="1"/><RegExpr String="lower\s*=" context="Lower Bound" lookAhead="1"/></context><context name="Block comment" attribute="Comment"><DetectSpaces/><StringDetect String="*/" attribute="Comment" context="#pop" endRegion="Comment"/><WordDetect String="@return" attribute="Doc Tag"/><WordDetect String="@param" attribute="Doc Tag"/><IncludeRules context="##Comments"/></context><context name="C-style comment" attribute="Comment" lineEndContext="#pop"><DetectSpaces/><IncludeRules context="##Comments"/></context><context name="Hash comment" attribute="Comment" lineEndContext="#pop"><DetectSpaces/><IncludeRules context="##Comments"/></context><context name="Lower Bound" attribute="Normal Text"><StringDetect String="lower" attribute="Keyword"/><DetectChar char="=" attribute="Punctuation" context="#pop"/></context><context name="String" attribute="String"><DetectChar char='"' attribute="String" context="#pop"/></context><context name="Truncation" attribute="Normal Text"><DetectChar char="T" attribute="Keyword"/><DetectChar char="[" attribute="Punctuation" 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="Int" defStyleNum="dsDecVal" spellChecking="0"/><itemData name="Real" defStyleNum="dsFloat" spellChecking="0"/><itemData name="Complex" defStyleNum="dsFloat" spellChecking="0"/><itemData name="String" defStyleNum="dsString"/><itemData name="Comment" defStyleNum="dsComment"/><itemData name="Assignment" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Operator" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Punctuation" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Identifier" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Doc Tag" defStyleNum="dsAnnotation" spellChecking="0"/></itemDatas></highlighting><general><comments><comment name="singleLine" start="//"/><comment name="multiLine" start="/*" end="*/" region="Comment"/></comments><keywords casesensitive="1"/></general></language>