forked from qt-creator/qt-creator
GenericHighlighter: Update from KSyntaxHighlighting
Change-Id: Iaabf7ca4b29c44b4c4c4defd476629c91e14ffcc Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
b2aa1b9845
commit
fc5b1795eb
@@ -8,7 +8,7 @@
|
||||
<!ENTITY noword "(?![\w$+-])"> <!-- no word, $, + or - following -->
|
||||
<!ENTITY pathpart "([\w_@.%*?+-]|\\ )"> <!-- valid character in a file name -->
|
||||
]>
|
||||
<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">
|
||||
<language name="Bash" version="6" kateversion="5.0" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.nix;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD" 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)
|
||||
@@ -626,8 +626,8 @@
|
||||
|
||||
<!-- FindStrings looks for single and double quoted strings, also with $-prefix -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindStrings">
|
||||
<Detect2Chars attribute="Escape" context="#stay" char="\\" char1="'" />
|
||||
<Detect2Chars attribute="Escape" context="#stay" char="\\" char1=""" />
|
||||
<Detect2Chars attribute="Escape" context="#stay" char="\" char1="'" />
|
||||
<Detect2Chars attribute="Escape" context="#stay" char="\" char1=""" />
|
||||
<DetectChar attribute="String SingleQ" context="StringSQ" char="'" />
|
||||
<DetectChar attribute="String DoubleQ" context="StringDQ" char=""" />
|
||||
<Detect2Chars attribute="String SingleQ" context="StringEsc" char="$" char1="'" />
|
||||
|
||||
@@ -29,7 +29,7 @@ Changelog:
|
||||
|
||||
-->
|
||||
|
||||
<language name="CSS" version="4" kateversion="5.0" section="Markup" extensions="*.css" indenter="cstyle" mimetype="text/css" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10">
|
||||
<language name="CSS" version="6" kateversion="5.0" section="Markup" extensions="*.css" indenter="cstyle" mimetype="text/css" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10">
|
||||
|
||||
<highlighting>
|
||||
<list name="properties">
|
||||
@@ -835,11 +835,6 @@ Changelog:
|
||||
<item>tv</item>
|
||||
</list>
|
||||
|
||||
<list name="mediatypes_op">
|
||||
<item>not</item>
|
||||
<item>only</item>
|
||||
</list>
|
||||
|
||||
<list name="media_features">
|
||||
<item>width</item>
|
||||
<item>min-width</item>
|
||||
@@ -1047,7 +1042,6 @@ Changelog:
|
||||
<itemData name="Selector Pseudo" defStyleNum="dsInformation" italic="1" spellChecking="false"/>
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false"/>
|
||||
<itemData name="Alert" defStyleNum="dsAlert" spellChecking="false"/>
|
||||
<itemData name="Error" defStyleNum="dsError" spellChecking="false"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!ENTITY wordsep "([][,?;()]|\.$|\.?\s)"> <!-- things that end a TagWord -->
|
||||
]>
|
||||
<language name="Doxygen"
|
||||
version="4"
|
||||
version="5"
|
||||
kateversion="5.0"
|
||||
section="Markup"
|
||||
extensions="*.dox;*.doxygen"
|
||||
@@ -336,7 +336,7 @@
|
||||
</context>
|
||||
<context name="ML_identifiers" attribute="Identifier" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" lookAhead="true" />
|
||||
<RegExpr attribute="String" context="#pop" String="\s*#?[a-zA-Z0-9]*" />
|
||||
<RegExpr attribute="Identifier" context="#pop" String="\s*#?[a-zA-Z0-9]*" />
|
||||
<DetectChar attribute="Types" context="ML_types1" char="'" />
|
||||
<DetectChar attribute="Types" context="ML_types2" char=""" />
|
||||
</context>
|
||||
@@ -400,7 +400,7 @@
|
||||
<StringDetect attribute="HTML Comment" context="#pop" String="-->" />
|
||||
</context>
|
||||
<context name="SL_identifiers" attribute="Identifier" lineEndContext="#pop">
|
||||
<RegExpr attribute="String" context="#pop" String="\s*#?[a-zA-Z0-9]*" />
|
||||
<RegExpr attribute="Identifier" context="#pop" String="\s*#?[a-zA-Z0-9]*" />
|
||||
<DetectChar attribute="Types" context="SL_types1" char="'" />
|
||||
<DetectChar attribute="Types" context="SL_types2" char=""" />
|
||||
</context>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<language name="Java" version="2" kateversion="5.0" section="Sources" extensions="*.java" mimetype="text/x-java" license="LGPL" author="Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br)">
|
||||
<language name="Java" version="3" kateversion="5.0" section="Sources" extensions="*.java" mimetype="text/x-java" license="LGPL" author="Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br)">
|
||||
<highlighting>
|
||||
<list name="java15">
|
||||
<item>ACTIVE</item>
|
||||
@@ -3801,7 +3801,7 @@
|
||||
<DetectChar attribute="Symbol" context="Printf" char="("/>
|
||||
<DetectSpaces attribute="Normal Text" context="#stay"/>
|
||||
</context>
|
||||
<context attribute="Printf" lineEndContext="#stay" name="Printf">
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Printf">
|
||||
<DetectChar attribute="String" context="PrintfString" char="""/>
|
||||
<IncludeRules context="InFunctionCall"/>
|
||||
</context>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- v4 by Alex Richardson <arichardson.kde@gmail.com>
|
||||
added bmake support -->
|
||||
<language name="Makefile" section="Other"
|
||||
version="5" kateversion="3.4"
|
||||
version="7" kateversion="3.4"
|
||||
extensions="GNUmakefile;Makefile;makefile;GNUmakefile.*;Makefile.*;makefile.*;*.mk"
|
||||
mimetype="text/x-makefile" priority="11"
|
||||
author="Per Wigren (wigren@home.se)" license="">
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
<keyword attribute="Keyword" context="#stay" String="keywords"/>
|
||||
<keyword attribute="Keyword" context="bmake_other_stmts" String="bmake_other_stmts" firstNonSpace="true"/>
|
||||
<RegExpr attribute="Variable" context="assign" String="[^\s:?]*\s*(?=:=|=|\+=|\?=)"/>
|
||||
<RegExpr attribute="Variable" context="assign" String="[^\s+:?+]*\s*(?=:=|=|\+=|\?=)"/>
|
||||
<keyword attribute="SpecialTarget" context="bmake_special_target" String="bmake_special_targets" firstNonSpace="true"/>
|
||||
<RegExpr attribute="SpecialTarget" context="prereq" String="\.PATH\.[^:]*:" firstNonSpace="true"/>
|
||||
<keyword attribute="Keyword" context="bmake_include" String="bmake_include_stmt" firstNonSpace="true"/>
|
||||
@@ -433,8 +433,6 @@
|
||||
c is omitted, then no separator is used. The common escapes
|
||||
(including octal numeric codes), work as expected. -->
|
||||
<Detect2Chars attribute="Builtin" context="#pop!bmake_var_modifier_arg" char="t" char1="s"/>
|
||||
<RegExpr String=""/>
|
||||
|
||||
|
||||
<IncludeRules context="bmake_var_modifier_arg"/>
|
||||
</context>
|
||||
|
||||
11
src/share/3rdparty/generic-highlighter/perl.xml
vendored
11
src/share/3rdparty/generic-highlighter/perl.xml
vendored
@@ -39,7 +39,7 @@
|
||||
|
||||
Enhance tr/// and y/// support.
|
||||
-->
|
||||
<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">
|
||||
<language name="Perl" version="5" 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>
|
||||
@@ -760,10 +760,6 @@
|
||||
<RegExpr attribute="Pod" context="pod" String="\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s+.*" column="0" beginRegion="POD"/>
|
||||
<StringDetect attribute="Keyword" context="normal" String="__END__" firstNonSpace="true" />
|
||||
</context>
|
||||
<context name="end_handle" attribute="Nothing" lineEndContext="#stay">
|
||||
<RegExpr attribute="Pod" context="pod" String="^\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s*.*"/>
|
||||
<StringDetect attribute="Keyword" context="data_handle" String="__DATA__" firstNonSpace="true" />
|
||||
</context>
|
||||
|
||||
<context name="Backticked" attribute="String (interpolated)" lineEndContext="#stay">
|
||||
<IncludeRules context="ipstring_internal"/>
|
||||
@@ -776,10 +772,6 @@
|
||||
<keyword attribute="Keyword" context="#pop" String="keywords" /><!-- wonder why??? -->
|
||||
</context>
|
||||
|
||||
<context name="package_qualified_blank" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="Normal Text" context="#pop" String="[\w_]+" />
|
||||
</context>
|
||||
|
||||
<context name="sub_name_def" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
||||
<RegExpr attribute="Function" context="#stay" String="\w+" />
|
||||
<RegExpr attribute="Normal Text" context="find_variable" String="\$\S" lookAhead="true" />
|
||||
@@ -829,7 +821,6 @@
|
||||
<itemData name="Data" defStyleNum="dsNormal" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Pod" defStyleNum="dsComment" />
|
||||
<itemData name="Nothing" defStyleNum="dsComment" />
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
|
||||
17
src/share/3rdparty/generic-highlighter/ruby.xml
vendored
17
src/share/3rdparty/generic-highlighter/ruby.xml
vendored
@@ -31,7 +31,7 @@
|
||||
|
||||
<!-- Hold the "language" opening tag on a single line, as mentioned in "language.dtd". -->
|
||||
<language name="Ruby" section="Scripts"
|
||||
version="4" kateversion="3.3"
|
||||
version="8" kateversion="3.3"
|
||||
extensions="*.rb;*.rjs;*.rxml;*.xml.erb;*.js.erb;*.rake;Rakefile;Gemfile;*.gemspec;Vagrantfile"
|
||||
mimetype="application/x-ruby"
|
||||
style="ruby" indenter="ruby"
|
||||
@@ -237,7 +237,7 @@
|
||||
Match them before $_.
|
||||
-->
|
||||
<RegExpr attribute="Global Variable" String="\$[a-zA-Z_0-9]+" context="check_div_1"/>
|
||||
<RegExpr attribute="Global Variable" String="\$\-[a-zA-z_]\b" context="check_div_1"/>
|
||||
<RegExpr attribute="Global Variable" String="\$\-[a-zA-Z_]\b" context="check_div_1"/>
|
||||
<!-- special-character globals -->
|
||||
<RegExpr attribute="Default globals" String="\$[\d_*`+@;,.~=\!\$:?'/\\\-\&"><]" context="check_div_1"/>
|
||||
<RegExpr attribute="Global Constant" String="\b[_A-Z]+[A-Z_0-9]+\b" context="check_div_2"/>
|
||||
@@ -428,17 +428,10 @@
|
||||
<RegExpr attribute="Member" String="\W" context="#pop"/>
|
||||
</context>
|
||||
|
||||
<context name="Comment Line" attribute="Comment" lineEndContext="#pop">
|
||||
<RegExpr attribute="Comment" String="\w\:\:\s" context="RDoc Label"/>
|
||||
<IncludeRules context="##Alerts" />
|
||||
</context>
|
||||
|
||||
<context name="General Comment" attribute="Comment" lineEndContext="#pop">
|
||||
<IncludeRules context="##Alerts" />
|
||||
</context>
|
||||
|
||||
<context name="RDoc Label" attribute="RDoc Value" lineEndContext="#pop"/>
|
||||
|
||||
<!-- HEREDOC support
|
||||
The contexts below support both normal and indented heredocs
|
||||
-->
|
||||
@@ -902,16 +895,10 @@
|
||||
|
||||
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||
<itemData name="Blockcomment" defStyleNum="dsComment"/>
|
||||
<itemData name="Region Marker" defStyleNum="dsNormal" color="#0000ff"/>
|
||||
<itemData name="RDoc Value" defStyleNum="dsOthers"/>
|
||||
|
||||
<itemData name="Here Document" defStyleNum="dsOthers"/>
|
||||
|
||||
<!-- use these to mark errors and alerts things -->
|
||||
<itemData name="Error" defStyleNum="dsError" />
|
||||
|
||||
<itemData name="Delimiter" defStyleNum="dsNormal" color="#FF9FEC"/>
|
||||
<itemData name="Expression" defStyleNum="dsOthers"/>
|
||||
<itemData name="Operator" defStyleNum="dsNormal" color="#FF9FEC"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
|
||||
Reference in New Issue
Block a user