mirror of
https://github.com/Nexoniarz/Finch.git
synced 2026-11-03 16:54:25 +00:00
docs, Kate and VS Code: const, if as a value, """ text, 1e9, str(x, 2), min/max/abs/clamp, import a/b and as, fs, C unions and macros
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016GzNP6r8dg6WDxUVZy8wjL
This commit is contained in:
parent
f2d6480749
commit
17863ecf7b
8 changed files with 163 additions and 35 deletions
|
|
@ -5,7 +5,7 @@
|
|||
Install: copy to ~/.local/share/org.kde.syntax-highlighting/syntax/finch.xml
|
||||
(or run editors/kate/install.sh), then restart Kate.
|
||||
-->
|
||||
<language name="Finch" version="2" kateversion="5.0" section="Sources" extensions="*.fch"
|
||||
<language name="Finch" version="3" kateversion="5.0" section="Sources" extensions="*.fch"
|
||||
mimetype="text/x-finch" indenter="cstyle" author="The Finch authors" license="Apache-2.0">
|
||||
<highlighting>
|
||||
<list name="keywords">
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
<item>struct</item>
|
||||
<item>enum</item>
|
||||
<item>export</item>
|
||||
<item>const</item>
|
||||
</list>
|
||||
<list name="control">
|
||||
<item>if</item>
|
||||
|
|
@ -79,6 +80,7 @@
|
|||
<Detect2Chars char="/" char1="*" attribute="Comment" context="BlockComment" beginRegion="Comment"/>
|
||||
<DetectChar char="{" attribute="Symbol" beginRegion="Brace"/>
|
||||
<DetectChar char="}" attribute="Symbol" endRegion="Brace"/>
|
||||
<StringDetect String=""""" attribute="String" context="LongString" beginRegion="LongString"/>
|
||||
<DetectChar char=""" attribute="String" context="String"/>
|
||||
<DetectChar char="'" attribute="Char" context="Char"/>
|
||||
|
||||
|
|
@ -91,7 +93,8 @@
|
|||
<keyword String="builtins" attribute="Built-in"/>
|
||||
|
||||
<RegExpr String="\b0[xX][0-9a-fA-F_]+\b" attribute="Hex"/>
|
||||
<RegExpr String="\b[0-9][0-9_]*\.[0-9][0-9_]*([eE][+-]?[0-9]+)?\b" attribute="Float"/>
|
||||
<RegExpr String="\b[0-9][0-9_]*(\.[0-9][0-9_]*)?[eE][+-]?[0-9]+\b" attribute="Float"/>
|
||||
<RegExpr String="\b[0-9][0-9_]*\.[0-9][0-9_]*\b" attribute="Float"/>
|
||||
<RegExpr String="\b[0-9][0-9_]*\b" attribute="Decimal"/>
|
||||
|
||||
<!-- a call: name( ; method or field after a dot -->
|
||||
|
|
@ -136,6 +139,11 @@
|
|||
<DetectChar char=""" attribute="String" context="#pop"/>
|
||||
</context>
|
||||
|
||||
<context name="LongString" attribute="String" lineEndContext="#stay">
|
||||
<RegExpr String="\\[ntr0\\"']" attribute="Escape"/>
|
||||
<StringDetect String=""""" attribute="String" context="#pop" endRegion="LongString"/>
|
||||
</context>
|
||||
|
||||
<context name="Char" attribute="Char" lineEndContext="#pop">
|
||||
<RegExpr String="\\[ntr0\\"']" attribute="Escape"/>
|
||||
<DetectChar char="'" attribute="Char" context="#pop"/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue