maude syntax updates
- negative rationals - fix string escapes - ±Infinity - strategy modules, decls, etc - some arrows etc i missed
This commit is contained in:
parent
dede580ecf
commit
c82d5cdb44
2 changed files with 24 additions and 12 deletions
|
@ -402,3 +402,4 @@ aside {
|
|||
.maude .cf { color: hsl(276deg, 75%, 35%); font-weight: 500; }
|
||||
.maude .op { color: hsl(220deg, 10%, 28%); }
|
||||
.maude .co { color: hsl(221deg, 10%, 39%); font-style: italic; }
|
||||
.maude :is(.st, .fl, .dv, .sc) { color: hsl(143deg, 100%, 20%); }
|
||||
|
|
|
@ -7,8 +7,10 @@
|
|||
<list name="modules">
|
||||
<item>mod</item> <item>endm</item> <item>is</item>
|
||||
<item>fmod</item> <item>endfm</item>
|
||||
<item>smod</item> <item>endsm</item>
|
||||
<item>th</item> <item>endth</item>
|
||||
<item>fth</item> <item>endfth</item>
|
||||
<item>sth</item> <item>endsth</item>
|
||||
<item>view</item> <item>endv</item>
|
||||
<item>from</item> <item>to</item>
|
||||
</list>
|
||||
|
@ -29,6 +31,8 @@
|
|||
<list name="eqs"> <item>eq</item> <item>ceq</item> </list>
|
||||
<list name="rules"> <item>rl</item> <item>crl</item> </list>
|
||||
<list name="members"> <item>mb</item> <item>cmb</item> </list>
|
||||
<list name="strats"> <item>strat</item> <item>strats</item> </list>
|
||||
<list name="sds"> <item>sd</item> <item>csd</item> </list>
|
||||
<list name="if"> <item>if</item> </list>
|
||||
|
||||
<contexts>
|
||||
|
@ -46,26 +50,31 @@
|
|||
<RegExpr attribute="if" context="#stay" String="/\\" />
|
||||
|
||||
<RegExpr attribute="punc" context="#stay"
|
||||
String="(?<=^|\s)(?:::?|->|=>|=(?:=|/=)?)(?=\s|$)" />
|
||||
String="(?<=^|\s)(?::[:=]?|->|<-|=>|=(?:=|/=)?|@)(?=\s|$)" />
|
||||
|
||||
<RegExpr attribute="delim" context="#stay"
|
||||
String="[{}\[\](),]|(?<=^|\s)\.(?=\s|$)" />
|
||||
|
||||
<DetectChar attribute="string" context="String" char=""" />
|
||||
|
||||
<Int attribute="int" context="#stay" />
|
||||
<Float attribute="float" context="#stay" />
|
||||
<RegExpr attribute="rat" context="#stay" String="\d+/\d+" />
|
||||
<RegExpr attribute="float" context="#stay"
|
||||
String="(?<=^|\s|[(\[{])-?Infinity(?=$|\s|[)\]}])" />
|
||||
<RegExpr attribute="rat" context="#stay" String="-?\d+(?:/\d+)?" />
|
||||
|
||||
<RegExpr attribute="comment" context="comment s"
|
||||
String="(?:---|\*\*\*)(?!\()" />
|
||||
<RegExpr attribute="comment" context="comment m"
|
||||
String="(?:---|\*\*\*)\(" />
|
||||
|
||||
<!-- todo make this more exact? -->
|
||||
<RegExpr attribute="qid" context="#stay"
|
||||
String="'(?:\S+|"(?:[^\\"]|\\.)*")" />
|
||||
</context>
|
||||
|
||||
<context attribute="string" lineEndContext="#stay" name="String">
|
||||
<RegExpr attribute="string" context="#stay" String="\\." />
|
||||
<DetectChar attribute="string esc" context="#pop" char=""" />
|
||||
<RegExpr attribute="string esc" context="#stay" String="\\." />
|
||||
<DetectChar attribute="string" context="#pop" char=""" />
|
||||
</context>
|
||||
|
||||
<context attribute="comment" lineEndContext="#pop" name="comment s" />
|
||||
|
@ -86,14 +95,16 @@
|
|||
<itemData name="eqs" defStyleNum="dsFunction" />
|
||||
<itemData name="rules" defStyleNum="dsControlFlow" />
|
||||
<itemData name="members" defStyleNum="dsKeyword" />
|
||||
<itemData name="strats" defStyleNum="dsControlFlow" />
|
||||
<itemData name="sds" defStyleNum="dsControlFlow" />
|
||||
<itemData name="if" defStyleNum="dsControlFlow" />
|
||||
<itemData name="punc" defStyleNum="dsOperator" />
|
||||
<itemData name="delim" defStyleNum="dsNormal" />
|
||||
<itemData name="string" defStyleNum="dsString" />
|
||||
<itemData name="string esc" defStyleNum="dsSpecialChar" />
|
||||
<itemData name="int" defStyleNum="dsDecVal" />
|
||||
<itemData name="float" defStyleNum="dsFloat" />
|
||||
<itemData name="rat" defStyleNum="dsFloat" />
|
||||
<itemData name="qid" defStyleNum="dsString" />
|
||||
<itemData name="comment" defStyleNum="dsComment" />
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
|
|
Loading…
Reference in a new issue