Skip to content

Commit

Permalink
Update syntax definitions from upstream.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Jun 20, 2023
1 parent 2f25c08 commit 51d6677
Show file tree
Hide file tree
Showing 148 changed files with 640 additions and 1,257 deletions.
2 changes: 1 addition & 1 deletion skylighting-core/xml/abc.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!DOCTYPE language>
<!-- Andrea Primiani - primiani at dag dot it
version1.10 - 12 december 2005 -->
<language name="ABC" version="8" kateversion="5.0" section="Other" extensions="*.abc;*.ABC" mimetype="text/vnd.abc" casesensitive="1" author="Andrea Primiani ([email protected])" license="LGPL">
Expand Down
2 changes: 1 addition & 1 deletion skylighting-core/xml/actionscript.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!DOCTYPE language>
<language name="ActionScript 2.0" version="9" kateversion="5.62" section="Sources" extensions="*.as" mimetype="text/x-actionscript" license="LGPL" author="Aaron Miller ([email protected])">
<highlighting>

Expand Down
2 changes: 1 addition & 1 deletion skylighting-core/xml/ada.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!DOCTYPE language>
<language name="Ada"
version="6"
kateversion="5.0"
Expand Down
2 changes: 1 addition & 1 deletion skylighting-core/xml/agda.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd"[
<!DOCTYPE language[
<!ENTITY charsdelim "_;.&#34;(){}@">
<!ENTITY wordsep "(?=[&charsdelim;]|\s|$)">
]>
Expand Down
6 changes: 4 additions & 2 deletions skylighting-core/xml/alert.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language version="7" kateversion="3.1" name="Alerts" section="Other" extensions="" mimetype="" author="Dominik Haumann ([email protected])" license="MIT" hidden="true">
<!DOCTYPE language>
<language version="8" kateversion="3.1" name="Alerts" section="Other" extensions="" mimetype="" author="Dominik Haumann ([email protected])" license="MIT" hidden="true">
<highlighting>
<list name="alerts_hi">
<item>ALERT</item>
Expand Down Expand Up @@ -36,6 +36,8 @@
<WordDetect attribute="Region Marker" context="#stay" String="END" endRegion="AlertRegion2" />
<keyword attribute="Alert Level 1" context="#stay" String="alerts_hi" />
<keyword attribute="Alert Level 2" context="#stay" String="alerts_mid" />
<!-- Some (Python?) linters use `noqa:` (small case w/ colon) -->
<WordDetect attribute="Alert Level 2" context="#stay" String="noqa:" />
<keyword attribute="Alert Level 3" context="#stay" String="alerts_lo" />
</context>
</contexts>
Expand Down
2 changes: 1 addition & 1 deletion skylighting-core/xml/apache.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!DOCTYPE language>

<!-- Changelog:
Expand Down
2 changes: 1 addition & 1 deletion skylighting-core/xml/asn1.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!DOCTYPE language>
<!--
You'll find the "Writing a Kate Highlighting XML File HOWTO" at http://kate.kde.org/doc/hlhowto.php
This is a template for the XML format used for syntax highlight descriptions
Expand Down
2 changes: 1 addition & 1 deletion skylighting-core/xml/asp.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!DOCTYPE language>
<language name="ASP" version="9" kateversion="5.44" section="Markup" extensions="*.asp;" mimetype="text/x-asp-src;text/x-asp-src" author="Antonio Salazar ([email protected])" license="LGPL">
<highlighting>
<list name="control structures">
Expand Down
2 changes: 1 addition & 1 deletion skylighting-core/xml/ats.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd"
<!DOCTYPE language
[
<!-- Regular expression constants: -->
<!ENTITY LETTER "A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\xff"> <!-- Latin-1 letters. -->
Expand Down
2 changes: 1 addition & 1 deletion skylighting-core/xml/awk.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!DOCTYPE language>
<language name="AWK" version="6" kateversion="5.0" section="Scripts"
extensions="*.awk" mimetype="text/x-awk" indenter="cstyle"
license="LGPL">
Expand Down
9 changes: 7 additions & 2 deletions skylighting-core/xml/bash.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd"
<!DOCTYPE language
[
<!ENTITY tab "&#009;">
<!ENTITY funcname "([^&_fragpathseps;}=#$]|[+!@](?!\())([^&_fragpathseps;}=$]*+([+!@](?!\())?+)*+">
Expand Down Expand Up @@ -66,7 +66,7 @@

<language
name="Bash"
version="46"
version="47"
kateversion="5.79"
section="Scripts"
extensions="*.sh;*.bash;*.ebuild;*.eclass;*.exlib;*.exheres-0;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD;APKBUILD"
Expand Down Expand Up @@ -1270,13 +1270,18 @@
<context attribute="Variable" lineEndContext="#pop" name="VarBracePrefix">
<DetectIdentifier attribute="Variable" context="#pop!VarBracePrefixSuffix"/>
<Int attribute="Variable" context="#pop!VarBracePrefixSuffix"/>
<AnyChar attribute="Parameter Expansion Operator" context="#pop!VarBracePrefixSharp" String="@*#"/>
</context>
<context attribute="Variable" lineEndContext="#pop" name="VarBracePrefixSuffix" fallthroughContext="#pop!VarError">
<DetectChar attribute="Parameter Expansion" context="#pop" char="}"/>
<AnyChar attribute="Parameter Expansion Operator" context="#stay" String="@*"/>
<StringDetect attribute="Parameter Expansion Operator" context="#stay" String="[@]"/>
<StringDetect attribute="Parameter Expansion Operator" context="#stay" String="[*]"/>
</context>
<context attribute="Variable" lineEndContext="#pop" name="VarBracePrefixSharp" fallthroughContext="#pop!VarError">
<DetectChar attribute="Parameter Expansion" context="#pop" char="}"/>
<DetectChar attribute="Parameter Expansion Operator" char="#"/>
</context>

<!-- VarBrace is called as soon as ${ or ${# are encoutered -->
<context attribute="Variable" lineEndContext="#stay" name="VarBrace" fallthroughContext="#pop!VarError">
Expand Down
2 changes: 1 addition & 1 deletion skylighting-core/xml/bibtex.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd"
<!DOCTYPE language
[
<!ENTITY stringVariable "[a-zA-Z0-9\-]+">
<!ENTITY fieldFormat "[a-zA-Z0-9\-_\.]+">
Expand Down
33 changes: 21 additions & 12 deletions skylighting-core/xml/c.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd"
<!DOCTYPE language
[
<!ENTITY int "(?:[0-9](?:'?[0-9]++)*+)">
<!ENTITY hex_int "(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f]++)*+)">
Expand All @@ -15,7 +15,7 @@
<!ENTITY pphash "&ispphash;\s*">
]>
<language name="C" section="Sources"
version="17" kateversion="5.79"
version="18" kateversion="5.79"
indenter="cstyle"
extensions="*.c;*.C;*.h"
mimetype="text/x-csrc;text/x-c++src;text/x-chdr"
Expand Down Expand Up @@ -45,14 +45,19 @@
</list>

<list name="keywords">
<item>alignas</item> <!-- C23 -->
<item>alignof</item> <!-- C23 -->
<item>auto</item>
<item>constexpr</item> <!-- C23 -->
<item>enum</item>
<item>extern</item>
<item>false</item> <!-- C23 -->
<item>inline</item>
<item>nullptr</item> <!-- C23 -->
<item>sizeof</item>
<item>static_assert</item> <!-- C23 -->
<item>struct</item>
<item>true</item> <!-- C23 -->
<item>typedef</item>
<item>typeof</item> <!-- C23 -->
<item>typeof_unqual</item> <!-- C23 -->
Expand All @@ -77,22 +82,18 @@
</list>

<list name="types">
<item>bool</item> <!-- C23 -->
<item>char</item>
<item>char16_t</item>
<item>char32_t</item>
<item>const</item>
<item>double</item>
<item>float</item>
<item>int</item>
<item>long</item>
<item>register</item>
<item>restrict</item>
<item>short</item>
<item>signed</item>
<item>static</item>
<item>unsigned</item>
<item>void</item>
<item>volatile</item>
<item>int8_t</item>
<item>int16_t</item>
<item>int32_t</item>
Expand Down Expand Up @@ -127,12 +128,12 @@
<item>ptrdiff_t</item>
<item>sig_atomic_t</item>
<item>wint_t</item>
<item>_BitInt</item>
<item>_BitInt</item> <!-- C23 -->
<item>_Bool</item>
<item>bool</item>
<item>_Decimal32</item>
<item>_Decimal64</item>
<item>_Decimal128</item>
<item>_Decimal32</item> <!-- C23 -->
<item>_Decimal64</item> <!-- C23 -->
<item>_Decimal128</item> <!-- C23 -->
<item>_Complex</item>
<item>complex</item>
<item>_Imaginary</item>
Expand All @@ -143,6 +144,14 @@
<item>fpos_t</item>
<item>time_t</item>
<item>max_align_t</item>

<!-- modifiers -->
<item>const</item>
<item>register</item>
<item>restrict</item>
<item>static</item>
<item>thread_local</item> <!-- C23 -->
<item>volatile</item>
</list>

<list name="preprocessor">
Expand Down Expand Up @@ -483,7 +492,7 @@
<context name="IntSuffix" attribute="Error" lineEndContext="#pop#pop" fallthroughContext="NumericSuffixError">
<DetectChar attribute="Error" context="#stay" char="'" />
<!-- https://en.cppreference.com/w/c/language/integer_constant#The_type_of_the_integer_constant -->
<RegExpr attribute="Standard Suffix" context="NumericSuffixError" String="([Uu](LL?|ll?)?|(LL?|ll?)[Uu]?|wb|WB)\b"/>
<RegExpr attribute="Standard Suffix" context="NumericSuffixError" String="([Uu](LL?|ll?|wb|WB)?|(LL?|ll?|wb|WB)[Uu]?)\b"/>
</context>

<context name="FloatSuffix" attribute="Error" lineEndContext="#pop#pop" fallthroughContext="NumericSuffixError">
Expand Down
2 changes: 1 addition & 1 deletion skylighting-core/xml/changelog.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!DOCTYPE language>
<language name="ChangeLog" version="4" kateversion="2.4" section="Other" extensions="ChangeLog" mimetype="" author="Dominik Haumann ([email protected])" license="MIT">
<highlighting>
<contexts>
Expand Down
75 changes: 4 additions & 71 deletions skylighting-core/xml/clojure.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!DOCTYPE language>
<!--
This file is part of KDE's kate project.
Expand All @@ -22,7 +22,7 @@
* Boston, MA 02110-1301, USA. *
**********************************************************************
-->
<language version="15" kateversion="5.0" name="Clojure" section="Sources" extensions="*.clj;*.cljs;*.cljc" mimetype="" author="Dominik Haumann [lisp] modified for clojure by Caspar Hasenclever" license="LGPLv2+">
<language version="16" kateversion="5.0" name="Clojure" section="Sources" extensions="*.clj;*.cljs;*.cljc" mimetype="" author="Dominik Haumann [lisp] modified for clojure by Caspar Hasenclever" license="LGPLv2+">
<highlighting>
<list name="definitions">
<item>def</item>
Expand Down Expand Up @@ -703,14 +703,6 @@
<item>true</item>
</list>
<contexts>
<context name="Level0" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Brackets1" context="Level1" char="("/>
<Detect2Chars attribute="Brackets1" context="Level1" char="'" char1="("/>
<Detect2Chars attribute="Brackets1" context="Level1" char="`" char1="("/>
<Detect2Chars attribute="Brackets1" context="Level1" char="#" char1="("/>
<Detect2Chars attribute="Brackets1" context="Level1" char="@" char1="("/>
<IncludeRules context="Default" />
</context>
<context name="Default" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Comment" context="Comment" char=";"/>
<Detect2Chars attribute="Comment" context="#stay" char="#" char1="_"/>
Expand All @@ -720,6 +712,7 @@
<Detect2Chars attribute="BracketsSet" context="BracketsSet" char="#" char1="{"/>
<Detect2Chars attribute="BracketsMeta" context="BracketsMeta" char="^" char1="{"/>
<DetectChar attribute="BracketsMap" context="BracketsMap" char="{"/>
<AnyChar attribute="Brackets" context="#stay" String="()"/>
<AnyChar attribute="BracketsSquare" context="#stay" String="[]"/>
<keyword attribute="Keyword" context="#stay" String="keywords"/>
<RegExpr attribute="Variable" context="#stay" String="#'[^\s\(\)\{\}\[\]]+|%[0-9]*"/>
Expand All @@ -734,7 +727,6 @@
<RegExpr attribute="Error" context="#stay" String="(3[7-9]|[0-9]*[4-9][0-9]+)[rR][0-9a-zA-Z]+"/>
<Float attribute="Float" context="Float Suffixes"/>
<Int attribute="Decimal" context="Int Suffixes"/>
<DetectChar attribute="Brackets1" context="Level1" char="("/>
</context>
<context name="Float Suffixes" attribute="Float" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<DetectChar attribute="Float" context="#pop" char="M"/>
Expand Down Expand Up @@ -783,60 +775,6 @@
<DetectChar attribute="BracketsMap" context="#pop" char="}" />
<IncludeRules context="Default" />
</context>
<context name="Level1" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Brackets2" context="Level2" char="("/>
<Detect2Chars attribute="Brackets2" context="Level2" char="'" char1="("/>
<Detect2Chars attribute="Brackets2" context="Level2" char="`" char1="("/>
<Detect2Chars attribute="Brackets2" context="Level2" char="#" char1="("/>
<Detect2Chars attribute="Brackets2" context="Level2" char="@" char1="("/>
<DetectChar attribute="Brackets1" context="#pop" char=")" />
<IncludeRules context="Default" />
</context>
<context name="Level2" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Brackets3" context="Level3" char="("/>
<Detect2Chars attribute="Brackets3" context="Level3" char="'" char1="("/>
<Detect2Chars attribute="Brackets3" context="Level3" char="`" char1="("/>
<Detect2Chars attribute="Brackets3" context="Level3" char="#" char1="("/>
<Detect2Chars attribute="Brackets3" context="Level3" char="@" char1="("/>
<DetectChar attribute="Brackets2" context="#pop" char=")" />
<IncludeRules context="Default" />
</context>
<context name="Level3" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Brackets4" context="Level4" char="("/>
<Detect2Chars attribute="Brackets4" context="Level4" char="'" char1="("/>
<Detect2Chars attribute="Brackets4" context="Level4" char="`" char1="("/>
<Detect2Chars attribute="Brackets4" context="Level4" char="#" char1="("/>
<Detect2Chars attribute="Brackets4" context="Level4" char="@" char1="("/>
<DetectChar attribute="Brackets3" context="#pop" char=")" />
<IncludeRules context="Default" />
</context>
<context name="Level4" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Brackets5" context="Level5" char="("/>
<Detect2Chars attribute="Brackets5" context="Level5" char="'" char1="("/>
<Detect2Chars attribute="Brackets5" context="Level5" char="`" char1="("/>
<Detect2Chars attribute="Brackets5" context="Level5" char="#" char1="("/>
<Detect2Chars attribute="Brackets5" context="Level5" char="@" char1="("/>
<DetectChar attribute="Brackets4" context="#pop" char=")" />
<IncludeRules context="Default" />
</context>
<context name="Level5" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Brackets6" context="Level6" char="("/>
<Detect2Chars attribute="Brackets6" context="Level6" char="'" char1="("/>
<Detect2Chars attribute="Brackets6" context="Level6" char="`" char1="("/>
<Detect2Chars attribute="Brackets6" context="Level6" char="#" char1="("/>
<Detect2Chars attribute="Brackets6" context="Level6" char="@" char1="("/>
<DetectChar attribute="Brackets5" context="#pop" char=")" />
<IncludeRules context="Default" />
</context>
<context name="Level6" attribute="Normal" lineEndContext="#stay">
<DetectChar attribute="Brackets1" context="Level1" char="("/>
<Detect2Chars attribute="Brackets1" context="Level1" char="'" char1="("/>
<Detect2Chars attribute="Brackets1" context="Level1" char="`" char1="("/>
<Detect2Chars attribute="Brackets1" context="Level1" char="#" char1="("/>
<Detect2Chars attribute="Brackets1" context="Level1" char="@" char1="("/>
<DetectChar attribute="Brackets6" context="#pop" char=")" />
<IncludeRules context="Default" />
</context>
</contexts>
<itemDatas>
<itemData name="Normal" defStyleNum="dsNormal" spellChecking="false"/>
Expand All @@ -860,13 +798,8 @@
<itemData name="BracketsSet" defStyleNum="dsNormal" color="#0000ff" selColor="#00ff00"/>
<itemData name="BracketsMeta" defStyleNum="dsNormal" color="#0000ff" selColor="#00ff00" bold="1" italic="0"/>
<itemData name="BracketsMap" defStyleNum="dsNormal" color="#33ab33" selColor="#219921"/>
<itemData name="Brackets" defStyleNum="dsNormal" color="#0000ff" selColor="#00ff00" bold="1" italic="0"/>
<itemData name="BracketsSquare" defStyleNum="dsNormal" color="#3333ff" selColor="#3333aa"/>
<itemData name="Brackets1" defStyleNum="dsNormal" color="#ff0000" selColor="#ffaa00" bold="0" italic="0"/>
<itemData name="Brackets2" defStyleNum="dsNormal" color="#ff8800" selColor="#ffff00" bold="0" italic="0"/>
<itemData name="Brackets3" defStyleNum="dsNormal" color="#888800" selColor="#888888" bold="0" italic="0"/>
<itemData name="Brackets4" defStyleNum="dsNormal" color="#008800" bold="0" italic="0"/>
<itemData name="Brackets5" defStyleNum="dsNormal" color="#3689e6" bold="0" italic="0"/>
<itemData name="Brackets6" defStyleNum="dsNormal" color="#a100a1" bold="0" italic="0"/>
</itemDatas>
</highlighting>
<general>
Expand Down
Loading

0 comments on commit 51d6677

Please sign in to comment.