quox syntax updates

This commit is contained in:
rhiannon morris 2024-09-15 17:49:47 +02:00
parent 9284365c72
commit f5ac91e29c

View file

@ -1,9 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd" [ <!DOCTYPE language SYSTEM "language.dtd" [ <!ENTITY hexit "[0-9a-fA-F]"> ]>
<!ENTITY tok_start "(?&lt;=^|\s|[(\[{}\]),:.])">
<!ENTITY tok_end "(?=$|\s|[(\[{}\]),:.])">
<!ENTITY hexit "[0-9a-fA-F]">
]>
<language name="quox" section="Sources" extensions="*.quox" <language name="quox" section="Sources" extensions="*.quox"
version="1" kateversion="5.53"> version="1" kateversion="5.53">
@ -23,9 +19,9 @@
<item>coe</item> <item>comp</item> <item>coe</item> <item>comp</item>
<item>λ</item> <item>fun</item> <item>λ</item> <item>fun</item>
<item>δ</item> <item>dfun</item> <item>δ</item> <item>dfun</item>
<item>return</item> <item>of</item> <item>case</item> <item>return</item> <item>of</item>
<item>return</item> <item>of</item>
<item>zero</item> <item>succ</item> <item>zero</item> <item>succ</item>
<item>let</item> <item>in</item>
</list> </list>
<list name="attrs"> <list name="attrs">
@ -58,7 +54,7 @@
<Detect2Chars attribute="exprs" context="#stay" char="=" char1=">" /> <Detect2Chars attribute="exprs" context="#stay" char="=" char1=">" />
<RegExpr attribute="exprs" context="qty_suffix" <RegExpr attribute="exprs" context="qty_suffix"
String="\bcase(?=([01#]|ω)?\b)" /> String="\b(case|let)(?=([01#]|ω)?\b)" />
<RegExpr attribute="hex_nat" context="#stay" <RegExpr attribute="hex_nat" context="#stay"
String="\b0[xX]&hexit;((&hexit;|_)*&hexit;)?\b(?!\.)" /> String="\b0[xX]&hexit;((&hexit;|_)*&hexit;)?\b(?!\.)" />
@ -74,7 +70,7 @@
String="(?&lt;!\w|-|')'(\w|-|')+" /> String="(?&lt;!\w|-|')'(\w|-|')+" />
<RegExpr attribute="qty" context="#stay" <RegExpr attribute="qty" context="#stay"
String="\b([01#]|ω)\.(?!\d)" /> String="(\b[01]|#|ω)\.(?!\d)" />
<DetectChar attribute="punc" context="#stay" char="=" /> <DetectChar attribute="punc" context="#stay" char="=" />
<DetectChar attribute="punc" context="#stay" char="@" /> <DetectChar attribute="punc" context="#stay" char="@" />
@ -85,6 +81,9 @@
char="-" char1="-" /> char="-" char1="-" />
<Detect2Chars attribute="comment" context="comment_m" <Detect2Chars attribute="comment" context="comment_m"
char="{" char1="-" /> char="{" char1="-" />
<RegExpr attribute="displace" context="#stay"
String="[⁰¹²³⁴⁵⁶⁷⁸⁹]|\^\d+" />
</context> </context>
<context attribute="qty" lineEndContext="#pop" name="qty_suffix"> <context attribute="qty" lineEndContext="#pop" name="qty_suffix">
@ -155,6 +154,7 @@
<itemData name="tag_esc" defStyleNum="dsSpecialChar" /> <itemData name="tag_esc" defStyleNum="dsSpecialChar" />
<itemData name="qty" defStyleNum="dsBuiltIn" /> <itemData name="qty" defStyleNum="dsBuiltIn" />
<itemData name="punc" defStyleNum="dsNormal" /> <itemData name="punc" defStyleNum="dsNormal" />
<itemData name="displace" defStyleNum="dsBuiltIn" />
<itemData name="attr" defStyleNum="dsNormal" /> <itemData name="attr" defStyleNum="dsNormal" />
<itemData name="attr_name" defStyleNum="dsAttribute" /> <itemData name="attr_name" defStyleNum="dsAttribute" />
<itemData name="comment" defStyleNum="dsComment" /> <itemData name="comment" defStyleNum="dsComment" />