GenericHighlighter: Update from KSyntaxHighlighting

Mostly whitespace cleanup.

Change-Id: Ife5831b23d5ee7406ece839f2c1061c9364ac4ad
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Orgad Shaneh
2017-01-16 14:48:57 +02:00
committed by Orgad Shaneh
parent 0332a8c173
commit 574b991310
10 changed files with 6499 additions and 6553 deletions

View File

@@ -1,36 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
This file is part of KDE's kate project.
copyright : (C) 2004 by Dominik Haumann
email : dhdev at gmx dot de
**********************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; if not, write to the *
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301, USA. *
**********************************************************************
This file is included in every file that highlights the "alerts" keywords.
That's why extensions and mimetype are empty.
Changes by Alex Turbov:
Introduce 3 alert levels and sort keywords according importance.
Few more keywords has been added.
-->
<language version="3" kateversion="3.1" name="Alerts" section="Other" extensions="" mimetype="" author="Dominik Haumann (dhdev@gmx.de)" license="LGPLv2+" hidden="true">
<language version="5" kateversion="3.1" name="Alerts" section="Other" extensions="" mimetype="" author="Dominik Haumann (dhaumann@kde.org)" license="MIT" hidden="true">
<highlighting>
<list name="alerts_hi">
<item>ALERT</item>
@@ -61,8 +31,8 @@
<context attribute="Normal Text" lineEndContext="#pop" name="Normal Text" >
<StringDetect attribute="Region Marker" context="#stay" String="{{{" beginRegion="AlertRegion1" />
<StringDetect attribute="Region Marker" context="#stay" String="}}}" endRegion="AlertRegion1" />
<StringDetect attribute="Region Marker" context="#stay" String="BEGIN" beginRegion="AlertRegion2" />
<StringDetect attribute="Region Marker" context="#stay" String="END" endRegion="AlertRegion2" />
<WordDetect attribute="Region Marker" context="#stay" String="BEGIN" beginRegion="AlertRegion2" />
<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" />
<keyword attribute="Alert Level 3" context="#stay" String="alerts_lo" />

View File

@@ -8,7 +8,7 @@
<!ENTITY noword "(?![\w$+-])"> <!-- no word, $, + or - following -->
<!ENTITY pathpart "([\w_@.&#37;*?+-]|\\ )"> <!-- valid character in a file name -->
]>
<language name="Bash" version="3" kateversion="5.0" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.nix;.bashrc;.bash_profile;.bash_login;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
<language name="Bash" version="4" kateversion="5.0" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.nix;.bashrc;.bash_profile;.bash_login;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
<!-- (c) 2004 by Wilbert Berendsen (wilbert@kde.nl)
Changes by Matthew Woehlke (mw_triad@users.sourceforge.net)
@@ -587,7 +587,8 @@
<RegExpr attribute="Redirection" context="#stay" String="([0-9]*(&gt;{1,2}|&lt;)(&amp;[0-9]+-?)?|&amp;&gt;|&gt;&amp;|[0-9]*&lt;&gt;)" />
<!-- handle &, &&, | and || -->
<RegExpr attribute="Control" context="#pop" String="([|&amp;;])\1?" />
<RegExpr attribute="Option" context="#stay" String="-?-[a-z][A-Za-z0-9_-]*" />
<RegExpr attribute="Normal Text" context="#stay" String="[a-zA-Z_]+-[A-Za-z0-9_-]*" />
<RegExpr attribute="Option" context="#stay" String="-?-[a-zA-Z_][A-Za-z0-9_-]*" />
<keyword attribute="Option" context="#stay" String="keywords" />
<AnyChar String=")}" context="#pop" lookAhead="true"/>
</context>

View File

@@ -3,39 +3,14 @@
[
<!ENTITY wordsep "([][,?;()]|\.$|\.?\s)"> <!-- things that end a TagWord -->
]>
<!--
This file is part of KDE's kate project.
Copyright 2004 Dominik Haumann (dhdev@gmx.de)
Copyright 2007 Matthew Woehlke (mw_triad@users.sourceforge.net)
Copyright 2009-2013 Alex Turbov (I.zaufi@gmail.com)
**********************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the *
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301, USA. *
**********************************************************************
-->
<language name="Doxygen"
version="3"
version="4"
kateversion="5.0"
section="Markup"
extensions="*.dox;*.doxygen"
mimetype="text/x-doxygen"
author="Dominik Haumann (dhdev@gmx.de)"
license="LGPLv2+"
author="Dominik Haumann (dhaumann@kde.org)"
license="MIT"
priority="9">
<highlighting>
<!-- NOTE: all tags may begin with a \ or @ char

View File

@@ -39,7 +39,7 @@
Enhance tr/// and y/// support.
-->
<language name="Perl" version="3" kateversion="2.4" section="Scripts" extensions="*.pl;*.PL;*.pm" mimetype="application/x-perl;text/x-perl" priority="5" author="Anders Lund (anders@alweb.dk)" license="LGPLv2">
<language name="Perl" version="4" kateversion="2.4" section="Scripts" extensions="*.pl;*.PL;*.pm" mimetype="application/x-perl;text/x-perl" priority="5" author="Anders Lund (anders@alweb.dk)" license="LGPLv2">
<highlighting>
<list name="keywords">
<item>if</item>
@@ -744,14 +744,14 @@
<RegExpr attribute="Keyword" context="here_document_dumb" String="\s*'([^']+)'\s*;?" />
</context>
<context name="here_document" attribute="String (interpolated)" lineEndContext="#stay" dynamic="true">
<DetectSpaces />
<RegExpr attribute="Keyword" context="#pop#pop" String="^%1\b" column="0" dynamic="true" endRegion="HereDocument"/>
<RegExpr attribute="Keyword" context="#pop#pop" String="%1\b" column="0" dynamic="true" endRegion="HereDocument"/>
<RegExpr attribute="Keyword" context="here_document" String="\=\s*&lt;&lt;\s*[&quot;']?([A-Z0-9_\-]+)[&quot;']?" beginRegion="HEREDoc" />
<IncludeRules context="ipstring_internal" />
<DetectSpaces />
</context>
<context name="here_document_dumb" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
<DetectSpaces />
<RegExpr attribute="Keyword" context="#pop#pop" String="%1" column="0" dynamic="true" endRegion="HereDocument"/>
<DetectSpaces />
<DetectIdentifier />
</context>

View File

@@ -31,7 +31,7 @@
<!-- Hold the "language" opening tag on a single line, as mentioned in "language.dtd". -->
<language name="Ruby" section="Scripts"
version="3" kateversion="3.3"
version="4" kateversion="3.3"
extensions="*.rb;*.rjs;*.rxml;*.xml.erb;*.js.erb;*.rake;Rakefile;Gemfile;*.gemspec;Vagrantfile"
mimetype="application/x-ruby"
style="ruby" indenter="ruby"
@@ -204,14 +204,14 @@
<RegExpr attribute="Keyword" String="\;\s*(while|until)\b(?!.*\bdo\b)" context="#stay" beginRegion="def block"/>
<RegExpr attribute="Keyword" String="(if|unless)\b" context="#stay" beginRegion="def block" firstNonSpace="true"/>
<RegExpr attribute="Keyword" String="\;\s*(if|unless)\b" context="#stay" beginRegion="def block"/>
<RegExpr attribute="Keyword" String="\bclass\b" context="#stay" beginRegion="def block"/>
<RegExpr attribute="Keyword" String="\bmodule\b" context="#stay" beginRegion="def block"/>
<RegExpr attribute="Keyword" String="\bbegin\b" context="#stay" beginRegion="def block"/>
<WordDetect attribute="Keyword" String="class" context="#stay" beginRegion="def block"/>
<WordDetect attribute="Keyword" String="module" context="#stay" beginRegion="def block"/>
<WordDetect attribute="Keyword" String="begin" context="#stay" beginRegion="def block"/>
<RegExpr attribute="Keyword" String="\bfor\b(?!.*\bdo\b)" context="#stay" beginRegion="def block"/>
<RegExpr attribute="Keyword" String="\bcase\b" context="#stay" beginRegion="def block"/>
<RegExpr attribute="Keyword" String="\bdo\b" context="#stay" beginRegion="def block"/>
<RegExpr attribute="Keyword" String="\bdef\b" context="#stay" beginRegion="def block"/>
<RegExpr attribute="Keyword" String="\bend\b" context="#stay" endRegion="def block"/>
<WordDetect attribute="Keyword" String="case" context="#stay" beginRegion="def block"/>
<WordDetect attribute="Keyword" String="do" context="#stay" beginRegion="def block"/>
<WordDetect attribute="Keyword" String="def" context="#stay" beginRegion="def block"/>
<WordDetect attribute="Keyword" String="end" context="#stay" endRegion="def block"/>
<!-- elsif/else close the current block and start a new one -->
<RegExpr attribute="Keyword" String="\b(else|elsif|rescue|ensure)\b" context="#stay" endRegion="def block" beginRegion="def block"/>

View File

@@ -6,7 +6,7 @@
<!ENTITY name "(?![0-9])[\w_:][\w.:_-]*">
<!ENTITY entref "&amp;(#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);">
]>
<language name="XML" version="5" kateversion="3.4" section="Markup" extensions="*.docbook;*.xml;*.rc;*.daml;*.rdf;*.rss;*.xspf;*.xsd;*.svg;*.ui;*.kcfg;*.qrc;*.wsdl;*.scxml" mimetype="text/xml;text/book;text/daml;text/rdf;application/rss+xml;application/xspf+xml;image/svg+xml;application/x-designer;application/xml;application/scxml+xml" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
<language name="XML" version="6" kateversion="3.4" section="Markup" extensions="*.docbook;*.xml;*.rc;*.daml;*.rdf;*.rss;*.xspf;*.xsd;*.svg;*.ui;*.kcfg;*.qrc;*.wsdl;*.scxml;*.xbel" mimetype="text/xml;text/book;text/daml;text/rdf;application/rss+xml;application/xspf+xml;image/svg+xml;application/x-designer;application/x-xbel;application/xml;application/scxml+xml" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
<highlighting>
<contexts>