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