diff options
Diffstat (limited to 'src/libs/3rdparty/syntax-highlighting/data/syntax')
8 files changed, 223 insertions, 39 deletions
diff --git a/src/libs/3rdparty/syntax-highlighting/data/syntax/cmake.xml b/src/libs/3rdparty/syntax-highlighting/data/syntax/cmake.xml index 2a9088b46c..6d170e4eaa 100644 --- a/src/libs/3rdparty/syntax-highlighting/data/syntax/cmake.xml +++ b/src/libs/3rdparty/syntax-highlighting/data/syntax/cmake.xml @@ -31,7 +31,7 @@ <language name="CMake" - version="11" + version="12" kateversion="2.4" section="Other" extensions="CMakeLists.txt;*.cmake;*.cmake.in" @@ -317,6 +317,7 @@ <item>PATTERN</item> <item>PERMISSIONS</item> <item>READ</item> + <item>READ_SYMLINK</item> <item>REGEX</item> <item>RELATIVE</item> <item>RELATIVE_PATH</item> @@ -335,6 +336,7 @@ <item>SHA3_512</item> <item>SHA512</item> <item>SHOW_PROGRESS</item> + <item>SIZE</item> <item>STATUS</item> <item>STRINGS</item> <item>TIMEOUT</item> @@ -484,8 +486,10 @@ <item>CACHE</item> <item>DIRECTORY</item> <item>EXT</item> + <item>LAST_EXT</item> <item>NAME</item> <item>NAME_WE</item> + <item>NAME_WLE</item> <item>PATH</item> <item>PROGRAM</item> <item>PROGRAM_ARGS</item> @@ -1054,6 +1058,7 @@ <item>COPY_FILE</item> <item>COPY_FILE_ERROR</item> <item>LINK_LIBRARIES</item> + <item>LINK_OPTIONS</item> <item>OUTPUT_VARIABLE</item> <item>RESULT_VAR</item> <item>SOURCES</item> @@ -1065,6 +1070,7 @@ <item>COMPILE_OUTPUT_VARIABLE</item> <item>COMPILE_RESULT_VAR</item> <item>LINK_LIBRARIES</item> + <item>LINK_OPTIONS</item> <item>OUTPUT_VARIABLE</item> <item>RUN_OUTPUT_VARIABLE</item> <item>RUN_RESULT_VAR</item> @@ -1209,6 +1215,7 @@ <item>CMAKE_ARCHIVE_OUTPUT_DIRECTORY</item> <item>CMAKE_ARGC</item> <item>CMAKE_ARGV0</item> + <item>CMAKE_AUTOGEN_ORIGIN_DEPENDS</item> <item>CMAKE_AUTOGEN_PARALLEL</item> <item>CMAKE_AUTOGEN_VERBOSE</item> <item>CMAKE_AUTOMOC</item> @@ -1223,6 +1230,7 @@ <item>CMAKE_BACKWARDS_COMPATIBILITY</item> <item>CMAKE_BINARY_DIR</item> <item>CMAKE_BUILD_RPATH</item> + <item>CMAKE_BUILD_RPATH_USE_ORIGIN</item> <item>CMAKE_BUILD_TOOL</item> <item>CMAKE_BUILD_TYPE</item> <item>CMAKE_BUILD_WITH_INSTALL_NAME_DIR</item> @@ -1297,6 +1305,7 @@ <item>CMAKE_FIND_PACKAGE_NAME</item> <item>CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY</item> <item>CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY</item> + <item>CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS</item> <item>CMAKE_FIND_PACKAGE_SORT_DIRECTION</item> <item>CMAKE_FIND_PACKAGE_SORT_ORDER</item> <item>CMAKE_FIND_PACKAGE_WARN_NO_MODULE</item> @@ -1316,6 +1325,10 @@ <item>CMAKE_GENERATOR_INSTANCE</item> <item>CMAKE_GENERATOR_PLATFORM</item> <item>CMAKE_GENERATOR_TOOLSET</item> + <item>CMAKE_GLOBAL_AUTOGEN_TARGET</item> + <item>CMAKE_GLOBAL_AUTOGEN_TARGET_NAME</item> + <item>CMAKE_GLOBAL_AUTORCC_TARGET</item> + <item>CMAKE_GLOBAL_AUTORCC_TARGET_NAME</item> <item>CMAKE_GNUtoMS</item> <item>CMAKE_HAS_ANSI_STRING_STREAM</item> <item>CMAKE_HOME_DIRECTORY</item> @@ -1412,6 +1425,7 @@ <item>CMAKE_MAJOR_VERSION</item> <item>CMAKE_MAKE_PROGRAM</item> <item>CMAKE_MATCH_COUNT</item> + <item>CMAKE_MAXIMUM_RECURSION_DEPTH</item> <item>CMAKE_MFC_FLAG</item> <item>CMAKE_MINIMUM_REQUIRED_VERSION</item> <item>CMAKE_MINOR_VERSION</item> @@ -1884,6 +1898,7 @@ <item>CTEST_SCP_COMMAND</item> <item>CTEST_SITE</item> <item>CTEST_SOURCE_DIRECTORY</item> + <item>CTEST_SUBMIT_URL</item> <item>CTEST_SVN_COMMAND</item> <item>CTEST_SVN_OPTIONS</item> <item>CTEST_SVN_UPDATE_OPTIONS</item> @@ -1964,6 +1979,8 @@ <item>PROJECT_VERSION_PATCH</item> <item>PROJECT_VERSION_TWEAK</item> <item>QTIFWDIR</item> + <item>SWIG_OUTFILE_DIR</item> + <item>SWIG_SOURCE_FILE_EXTENSIONS</item> <item>THREADS_PREFER_PTHREAD_FLAG</item> <item>UNIX</item> <item>WIN32</item> @@ -1982,6 +1999,7 @@ <item>AUTORCC_SOURCE_GROUP</item> <item>CMAKE_CXX_KNOWN_FEATURES</item> <item>CMAKE_C_KNOWN_FEATURES</item> + <item>CMAKE_ROLE</item> <item>DEBUG_CONFIGURATIONS</item> <item>DISABLED_FEATURES</item> <item>ECLIPSE_EXTRA_NATURES</item> @@ -2067,17 +2085,24 @@ <item>ARCHIVE_OUTPUT_DIRECTORY</item> <item>ARCHIVE_OUTPUT_NAME</item> <item>AUTOGEN_BUILD_DIR</item> + <item>AUTOGEN_ORIGIN_DEPENDS</item> <item>AUTOGEN_TARGET_DEPENDS</item> <item>AUTOMOC</item> + <item>AUTOMOC_COMPILER_PREDEFINES</item> <item>AUTOMOC_DEPEND_FILTERS</item> + <item>AUTOMOC_EXECUTABLE</item> + <item>AUTOMOC_MACRO_NAMES</item> <item>AUTOMOC_MOC_OPTIONS</item> <item>AUTORCC</item> + <item>AUTORCC_EXECUTABLE</item> <item>AUTORCC_OPTIONS</item> <item>AUTOUIC</item> + <item>AUTOUIC_EXECUTABLE</item> <item>AUTOUIC_OPTIONS</item> <item>AUTOUIC_SEARCH_PATHS</item> <item>BINARY_DIR</item> <item>BUILD_RPATH</item> + <item>BUILD_RPATH_USE_ORIGIN</item> <item>BUILD_WITH_INSTALL_NAME_DIR</item> <item>BUILD_WITH_INSTALL_RPATH</item> <item>BUNDLE</item> diff --git a/src/libs/3rdparty/syntax-highlighting/data/syntax/doxygen.xml b/src/libs/3rdparty/syntax-highlighting/data/syntax/doxygen.xml index 99b1d79c02..a6abda9204 100644 --- a/src/libs/3rdparty/syntax-highlighting/data/syntax/doxygen.xml +++ b/src/libs/3rdparty/syntax-highlighting/data/syntax/doxygen.xml @@ -4,7 +4,7 @@ <!ENTITY wordsep "([][,?;()]|\.$|\.?\s)"> <!-- things that end a TagWord --> ]> <language name="Doxygen" - version="5" + version="6" kateversion="5.0" section="Markup" extensions="*.dox;*.doxygen" @@ -463,7 +463,7 @@ <itemData name="Tags" defStyleNum="dsAnnotation" bold="1" /> <itemData name="Custom Tags" defStyleNum="dsAnnotation" /> <itemData name="Word" defStyleNum="dsCommentVar" bold="1" italic="0" /> - <itemData name="HTML Tag" defStyleNum="dsKeyword" color="#000000" bold="1" italic="0" /> + <itemData name="HTML Tag" defStyleNum="dsKeyword" bold="1" italic="0" /> <itemData name="Entities" defStyleNum="dsOthers" color="#4086C0" bold="1" italic="1" /> <itemData name="Description" defStyleNum="dsDocumentation" /> <itemData name="Comment" defStyleNum="dsComment" /> diff --git a/src/libs/3rdparty/syntax-highlighting/data/syntax/html.xml b/src/libs/3rdparty/syntax-highlighting/data/syntax/html.xml index 4f9eb962d7..107e1067da 100644 --- a/src/libs/3rdparty/syntax-highlighting/data/syntax/html.xml +++ b/src/libs/3rdparty/syntax-highlighting/data/syntax/html.xml @@ -5,7 +5,7 @@ <!ENTITY attributeName "[A-Za-z_:*#\(\[][\)\]\w.:_-]*"> <!ENTITY entref "&(#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);"> ]> -<language name="HTML" version="5" kateversion="3.4" section="Markup" extensions="*.htm;*.html;*.shtml;*.shtm" mimetype="text/html" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10"> +<language name="HTML" version="7" kateversion="3.4" section="Markup" extensions="*.htm;*.html;*.shtml;*.shtm" mimetype="text/html" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10"> <highlighting> <contexts> @@ -163,16 +163,23 @@ </context> <context name="JS" attribute="Other Text" lineEndContext="#stay"> - <Detect2Chars attribute="Element" context="#pop" char="/" char1=">" endRegion="script" /> + <RegExpr attribute="Attribute" context="Script-Type" String="(\s+|^)type(?=\=|\s|$)" insensitive="true"/> <DetectChar attribute="Element" context="JS content" char=">" /> + <IncludeRules context="DefaultJS" /> + </context> + <context name="DefaultJS" attribute="Other Text" lineEndContext="#stay"> + <Detect2Chars attribute="Element" context="#pop" char="/" char1=">" endRegion="script" /> <IncludeRules context="FindAttributes" /> <RegExpr attribute="Error" context="#stay" String="\S" /> </context> <context name="JS content" attribute="Other Text" lineEndContext="#stay"> + <IncludeRules context="Default JS content"/> + <IncludeRules context="Normal##JavaScript" includeAttrib="true"/> + </context> + <context name="Default JS content" attribute="Other Text" lineEndContext="#stay"> <RegExpr attribute="Element" context="El Close 2" String="</script\b" insensitive="true" endRegion="script" /> <RegExpr attribute="Comment" context="JS comment close" String="//(?=.*</script\b)" insensitive="true" /> - <IncludeRules context="Normal##JavaScript" includeAttrib="true"/> </context> <context name="JS comment close" attribute="Comment" lineEndContext="#pop"> @@ -202,6 +209,79 @@ <IncludeRules context="FindEntityRefs" /> </context> + <!-- Read content from the "type" attribute to change the language to + highlight in the <script> tag. The default language is JavaScript. --> + + <context name="Script-Type" attribute="Other Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> + <DetectSpaces /> + <DetectChar attribute="Attribute" context="#pop!Script-Type Value" char="=" /> + </context> + <context name="Script-Type Value" attribute="Other Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop!Value"> + <DetectSpaces /> + <!-- TypeScript --> + <StringDetect attribute="Value" context="#pop#pop!TypeScript" String=""text/typescript""/> + <StringDetect attribute="Value" context="#pop#pop!TypeScript" String="'text/typescript'"/> + <!-- JSX (JavaScript React) --> + <StringDetect attribute="Value" context="#pop#pop!JSX" String=""text/jsx""/> + <StringDetect attribute="Value" context="#pop#pop!JSX" String="'text/jsx'"/> + <StringDetect attribute="Value" context="#pop#pop!JSX" String=""text/babel""/> + <StringDetect attribute="Value" context="#pop#pop!JSX" String="'text/babel'"/> + <!-- MustacheJS / HandlebarsJS / RactiveJS --> + <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String=""x-tmpl-mustache""/> + <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="'x-tmpl-mustache'"/> + <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String=""text/mustache""/> + <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="'text/mustache'"/> + <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String=""text/x-mustache-template""/> + <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="'text/x-mustache-template'"/> + <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String=""text/x-handlebars-template""/> + <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="'text/x-handlebars-template'"/> + <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String=""text/ractive""/> + <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="'text/ractive'"/> + <!-- HTML templates --> + <StringDetect attribute="Value" context="#pop#pop!Script HTML template" String=""text/html""/> + <StringDetect attribute="Value" context="#pop#pop!Script HTML template" String="'text/html'"/> + </context> + + <context name="JSX" attribute="Other Text" lineEndContext="#stay"> + <DetectChar attribute="Element" context="JSX content" char=">" /> + <IncludeRules context="DefaultJS" /> + </context> + <context name="JSX content" attribute="Other Text" lineEndContext="#stay"> + <IncludeRules context="Default JS content"/> + <IncludeRules context="Normal##JavaScript React" includeAttrib="true"/> + </context> + + <context name="TypeScript" attribute="Other Text" lineEndContext="#stay"> + <DetectChar attribute="Element" context="TypeScript content" char=">" /> + <IncludeRules context="DefaultJS" /> + </context> + <context name="TypeScript content" attribute="Other Text" lineEndContext="#stay"> + <IncludeRules context="Default JS content"/> + <IncludeRules context="Normal##TypeScript" includeAttrib="true"/> + </context> + + <context name="MustacheJS" attribute="Other Text" lineEndContext="#stay"> + <DetectChar attribute="Element" context="MustacheJS content" char=">" /> + <IncludeRules context="DefaultJS" /> + </context> + <context name="MustacheJS content" attribute="Other Text" lineEndContext="#stay"> + <RegExpr attribute="Element" context="El Close 2" String="</script\b" insensitive="true" endRegion="script" /> + <StringDetect attribute="Error" context="#stay" String="<script>" insensitive="true" /> + <RegExpr attribute="Error" context="#stay" String="<script\b" insensitive="true" /> + <IncludeRules context="Base##Mustache/Handlebars (HTML)" includeAttrib="true"/> + </context> + + <context name="Script HTML template" attribute="Other Text" lineEndContext="#stay"> + <DetectChar attribute="Element" context="Script HTML template content" char=">" /> + <IncludeRules context="DefaultJS" /> + </context> + <context name="Script HTML template content" attribute="Other Text" lineEndContext="#stay"> + <RegExpr attribute="Element" context="El Close 2" String="</script\b" insensitive="true" endRegion="script" /> + <StringDetect attribute="Error" context="#stay" String="<script>" insensitive="true" /> + <RegExpr attribute="Error" context="#stay" String="<script\b" insensitive="true" /> + <IncludeRules context="FindHTML" /> + </context> + </contexts> <itemDatas> <itemData name="Normal Text" defStyleNum="dsNormal" /> diff --git a/src/libs/3rdparty/syntax-highlighting/data/syntax/ini.xml b/src/libs/3rdparty/syntax-highlighting/data/syntax/ini.xml index 465422f0b0..ce300fff47 100644 --- a/src/libs/3rdparty/syntax-highlighting/data/syntax/ini.xml +++ b/src/libs/3rdparty/syntax-highlighting/data/syntax/ini.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE language SYSTEM "language.dtd"> -<language name="INI Files" section="Configuration" extensions="*.ini;*.pls;*.kcfgc;*.conf" mimetype="" version="4" kateversion="2.4" author="Jan Janssen (medhefgo@web.de)" license="LGPL"> +<language name="INI Files" section="Configuration" extensions="*.ini;*.pls;*.kcfgc" mimetype="" version="5" kateversion="2.4" author="Jan Janssen (medhefgo@web.de)" license="LGPL"> <highlighting> <list name="keywords"> diff --git a/src/libs/3rdparty/syntax-highlighting/data/syntax/markdown.xml b/src/libs/3rdparty/syntax-highlighting/data/syntax/markdown.xml index 39ffaf77af..f88848729f 100644 --- a/src/libs/3rdparty/syntax-highlighting/data/syntax/markdown.xml +++ b/src/libs/3rdparty/syntax-highlighting/data/syntax/markdown.xml @@ -35,7 +35,7 @@ <!ENTITY strikeoutregex "[~]{2}[^~].*[^~][~]{2}"> <!-- pandoc style --> ]> -<language name="Markdown" version="3" kateversion="3.8" section="Markup" extensions="*.md;*.mmd;*.markdown" priority="15" author="Darrin Yeager, Claes Holmerson" license="GPL,BSD"> +<language name="Markdown" version="6" kateversion="5.0" section="Markup" extensions="*.md;*.mmd;*.markdown" priority="15" author="Darrin Yeager, Claes Holmerson" license="GPL,BSD"> <highlighting> <contexts> <context attribute="Normal Text" lineEndContext="#stay" name="Normal Text"> @@ -74,13 +74,57 @@ <context attribute="comment" lineEndContext="#stay" name="comment"> <RegExpr String="-->" attribute="comment" context="#pop" endRegion="comment"/> </context> + <context attribute="code" lineEndContext="#stay" name="bash-code"> + <WordDetect attribute="code" context="#pop" String="```"/> + <IncludeRules context="##Bash" includeAttrib="true"/> + </context> + <context attribute="code" lineEndContext="#stay" name="cmake-code"> + <WordDetect attribute="code" context="#pop" String="```"/> + <IncludeRules context="##CMake" includeAttrib="true"/> + </context> + <context attribute="code" lineEndContext="#stay" name="cpp-code"> + <WordDetect attribute="code" context="#pop" String="```"/> + <IncludeRules context="##C++" includeAttrib="true"/> + </context> + <context attribute="code" lineEndContext="#stay" name="css-code"> + <WordDetect attribute="code" context="#pop" String="```"/> + <IncludeRules context="##CSS" includeAttrib="true"/> + </context> + <context attribute="code" lineEndContext="#stay" name="email-code"> + <WordDetect attribute="code" context="#pop" String="```"/> + <IncludeRules context="##Email" includeAttrib="true"/> + </context> + <context attribute="code" lineEndContext="#stay" name="haskell-code"> + <WordDetect attribute="code" context="#pop" String="```"/> + <IncludeRules context="##Haskell" includeAttrib="true"/> + </context> + <context attribute="code" lineEndContext="#stay" name="html-code"> + <WordDetect attribute="code" context="#pop" String="```"/> + <IncludeRules context="##HTML" includeAttrib="true"/> + </context> + <context attribute="code" lineEndContext="#stay" name="json-code"> + <WordDetect attribute="code" context="#pop" String="```"/> + <IncludeRules context="##JSON" includeAttrib="true"/> + </context> <context attribute="code" lineEndContext="#stay" name="php-code"> <WordDetect attribute="code" context="#pop" String="```"/> - <IncludeRules context="phpsource##PHP/PHP"/> + <IncludeRules context="phpsource##PHP/PHP" includeAttrib="true"/> </context> <context attribute="code" lineEndContext="#stay" name="python-code"> <WordDetect attribute="code" context="#pop" String="```"/> - <IncludeRules context="##Python"/> + <IncludeRules context="##Python" includeAttrib="true"/> + </context> + <context attribute="code" lineEndContext="#stay" name="qml-code"> + <WordDetect attribute="code" context="#pop" String="```"/> + <IncludeRules context="##QML" includeAttrib="true"/> + </context> + <context attribute="code" lineEndContext="#stay" name="rust-code"> + <WordDetect attribute="code" context="#pop" String="```"/> + <IncludeRules context="##Rust" includeAttrib="true"/> + </context> + <context attribute="code" lineEndContext="#stay" name="xml-code"> + <WordDetect attribute="code" context="#pop" String="```"/> + <IncludeRules context="##XML" includeAttrib="true"/> </context> <context attribute="code" lineEndContext="#stay" name="code"> <WordDetect attribute="code" context="#pop" String="```"/> @@ -98,8 +142,19 @@ <RegExpr attribute="mailtolink" String="&mailtolinkregex;"/> <RegExpr attribute="strikeout" minimal="true" String="&strikeoutregex;"/> <RegExpr attribute="linebreak" minimal="true" String="&linebreakregex;"/> + <WordDetect attribute="code" context="bash-code" String="```bash"/> + <WordDetect attribute="code" context="cmake-code" String="```cmake"/> + <WordDetect attribute="code" context="cpp-code" String="```cpp"/> + <WordDetect attribute="code" context="css-code" String="```css"/> + <WordDetect attribute="code" context="email-code" String="```email"/> + <WordDetect attribute="code" context="haskell-code" String="```haskell"/> + <WordDetect attribute="code" context="html-code" String="```html"/> + <WordDetect attribute="code" context="json-code" String="```json"/> <WordDetect attribute="code" context="php-code" String="```php"/> <WordDetect attribute="code" context="python-code" String="```python"/> + <WordDetect attribute="code" context="qml-code" String="```qml"/> + <WordDetect attribute="code" context="rust-code" String="```rust"/> + <WordDetect attribute="code" context="xml-code" String="```xml"/> <StringDetect attribute="code" context="code" String="```"/> </context> </contexts> @@ -121,12 +176,12 @@ <itemData name="blockquote" defStyleNum="dsDataType"/> <itemData name="bq-emphasis" defStyleNum="dsDataType" italic="true"/> <itemData name="bq-strong" defStyleNum="dsDataType" bold="true"/> - <itemData name="bullet" defStyleNum="dsFloat"/> - <itemData name="bl-emphasis" defStyleNum="dsFloat" italic="true"/> - <itemData name="bl-strong" defStyleNum="dsFloat" bold="true"/> - <itemData name="numlist" defStyleNum="dsFloat"/> - <itemData name="nl-emphasis" defStyleNum="dsFloat" italic="true"/> - <itemData name="nl-strong" defStyleNum="dsFloat" bold="true"/> + <itemData name="bullet" defStyleNum="dsString"/> + <itemData name="bl-emphasis" defStyleNum="dsString" italic="true"/> + <itemData name="bl-strong" defStyleNum="dsString" bold="true"/> + <itemData name="numlist" defStyleNum="dsString"/> + <itemData name="nl-emphasis" defStyleNum="dsString" italic="true"/> + <itemData name="nl-strong" defStyleNum="dsString" bold="true"/> <itemData name="comment" defStyleNum="dsComment"/> <itemData name="code" defStyleNum="dsBaseN"/> <itemData name="reflink" defStyleNum="dsOthers" underline="true"/> diff --git a/src/libs/3rdparty/syntax-highlighting/data/syntax/perl.xml b/src/libs/3rdparty/syntax-highlighting/data/syntax/perl.xml index cd3d3ce65c..0d1931649c 100644 --- a/src/libs/3rdparty/syntax-highlighting/data/syntax/perl.xml +++ b/src/libs/3rdparty/syntax-highlighting/data/syntax/perl.xml @@ -39,7 +39,7 @@ Enhance tr/// and y/// support. --> -<language name="Perl" version="7" kateversion="2.4" section="Scripts" extensions="*.pl;*.PL;*.pm;*.pl6;*.PL6;*.p6;*.pm6;" mimetype="application/x-perl;text/x-perl" priority="5" author="Anders Lund (anders@alweb.dk)" license="LGPLv2"> +<language name="Perl" version="8" kateversion="2.4" section="Scripts" extensions="*.pl;*.PL;*.pm;*.pl6;*.PL6;*.p6;*.pm6;" mimetype="application/x-perl;text/x-perl" priority="5" author="Anders Lund (anders@alweb.dk)" license="LGPLv2"> <highlighting> <list name="keywords"> <item>if</item> @@ -383,8 +383,11 @@ <RegExpr attribute="Operator" context="find_pattern" String="\b(?:m|qr)(?=\s*[^\w\s\]})])" /> - <RegExpr attribute="Normal Text" context="#stay" String="[\w_]+\s*/" /> - <RegExpr attribute="Normal Text" context="#stay" String="[<>"':]/" /> + <RegExpr attribute="Normal Text" context="#stay" String="[\w_]+\s*//?\=?" /> + <RegExpr attribute="Normal Text" context="#stay" String="[<>"':]//?\=?" /> + <!-- Avoid conflicts between operators / and // --> + <StringDetect attribute="Normal Text" context="#stay" String="//=" /> + <Detect2Chars attribute="Normal Text" context="#stay" char="/" char1="/" /> <DetectChar attribute="Operator" context="pattern_slash" char="/" beginRegion="Pattern" /> <RegExpr attribute="Operator" context="#stay" String="-[rwxoRWXOeszfdlpSbctugkTBMAC]\b" /> diff --git a/src/libs/3rdparty/syntax-highlighting/data/syntax/ruby.xml b/src/libs/3rdparty/syntax-highlighting/data/syntax/ruby.xml index 754dfdc5fe..a451e1442f 100644 --- a/src/libs/3rdparty/syntax-highlighting/data/syntax/ruby.xml +++ b/src/libs/3rdparty/syntax-highlighting/data/syntax/ruby.xml @@ -31,7 +31,7 @@ <!-- Hold the "language" opening tag on a single line, as mentioned in "language.dtd". --> <language name="Ruby" section="Scripts" - version="9" kateversion="3.3" + version="10" kateversion="3.3" extensions="*.rb;*.rjs;*.rxml;*.xml.erb;*.js.erb;*.rake;Rakefile;Gemfile;*.gemspec;Vagrantfile" mimetype="application/x-ruby" style="ruby" indenter="ruby" @@ -179,11 +179,11 @@ <item>warn</item> </list> - <list name="mixin-methods"> - <item>extend</item> - <item>include</item> - <item>prepend</item> - </list> + <list name="mixin-methods"> + <item>extend</item> + <item>include</item> + <item>prepend</item> + </list> <contexts> <context name="Normal" attribute="Normal Text" lineEndContext="#stay"> @@ -204,7 +204,7 @@ <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"/> - <WordDetect attribute="Keyword" String="class" context="#stay" beginRegion="def block"/> + <WordDetect attribute="Keyword" String="class" context="no_heredoc" 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"/> @@ -231,7 +231,7 @@ <keyword attribute="Pseudo variable" String="pseudo-variables" context="check_div_1"/> <keyword attribute="Default globals" String="default-globals" context="check_div_2"/> <keyword attribute="Kernel methods" String="kernel-methods" context="check_div_2"/> - <keyword attribute="Module mixin methods" String="mixin-methods" context="check_div_2"/> + <keyword attribute="Module mixin methods" String="mixin-methods" context="check_div_2"/> <!-- (global) vars starting with $ Match them before $_. @@ -263,8 +263,8 @@ push operator '<<' than requiring to put space between the operator and the string. --> - <RegExpr attribute="Operator" context="find_indented_heredoc" String="\s*<<-(?=\w+|["'])" beginRegion="HereDocument" /> - <RegExpr attribute="Operator" context="find_heredoc" String="\s*<<(?=\w+|["'])" beginRegion="HereDocument" /> + <RegExpr attribute="Operator" context="find_indented_heredoc" String="\s*<<[-~](?=\w+|["'`])" beginRegion="HereDocument" /> + <RegExpr attribute="Operator" context="find_heredoc" String="\s*<<(?=\w+|["'`])" beginRegion="HereDocument" /> <DetectChar attribute="Operator" char="." context="#stay"/> <Detect2Chars attribute="Operator" char="&" char1="&" context="#stay"/> @@ -280,8 +280,10 @@ <RegExpr attribute="Symbol" String=":(@{1,2}|\$)?[a-zA-Z_][a-zA-Z0-9_]*[=?!]?" context="check_div_1"/> <RegExpr attribute="Symbol" String=":\[\]=?" context="check_div_1"/> - <RegExpr attribute="Symbol" String="(@{1,2}|\$)?[a-zA-Z_][a-zA-Z0-9_]*[=?!]?: " context="check_div_1"/> - <RegExpr attribute="Symbol" String="\[\]=?: " context="check_div_1"/> + <!-- Do not send to "check_div_1" context!: + after detecting these rules (": ") there can be a regular expression (see bug: #361875) --> + <RegExpr attribute="Symbol" String="(@{1,2}|\$)?[a-zA-Z_][a-zA-Z0-9_]*[=?!]?: " context="#stay"/> + <RegExpr attribute="Symbol" String="\[\]=?: " context="#stay"/> <DetectChar attribute="String" char=""" context="Quoted String"/> <DetectChar attribute="Raw String" char="'" context="Apostrophed String"/> @@ -436,13 +438,17 @@ The contexts below support both normal and indented heredocs --> <!-- here we markup the heredoc markers --> - <context name="find_heredoc" attribute="Normal Text" lineEndContext="#pop" > + <context name="find_heredoc" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> <RegExpr attribute="Keyword" context="apostrophed_normal_heredoc" String="'(\w+)'" /> - <RegExpr attribute="Keyword" context="normal_heredoc" String=""?(\w+)"?" /> + <RegExpr attribute="Keyword" context="normal_heredoc" String="(\w+)" /> + <RegExpr attribute="Keyword" context="normal_heredoc" String=""(\w+)"" /> + <RegExpr attribute="Keyword" context="normal_heredoc" String="`(\w+)`" /> </context> - <context name="find_indented_heredoc" attribute="Normal Text" lineEndContext="#pop" > + <context name="find_indented_heredoc" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> <RegExpr attribute="Keyword" context="apostrophed_indented_heredoc" String="'(\w+)'" /> - <RegExpr attribute="Keyword" context="indented_heredoc" String=""?(\w+)"?" /> + <RegExpr attribute="Keyword" context="indented_heredoc" String="(\w+)" /> + <RegExpr attribute="Keyword" context="indented_heredoc" String=""(\w+)"" /> + <RegExpr attribute="Keyword" context="indented_heredoc" String="`(\w+)`" /> </context> <!-- these are the real heredoc contexts --> <context name="indented_heredoc" attribute="Here Document" lineEndContext="#stay" dynamic="true"> @@ -467,6 +473,16 @@ <Detect2Chars attribute="Substitution" char="#" char1="{" context="Subst"/> </context> + <!-- avoid highlighting heredoc markers, for example, in singleton class definition (see bug: #358273) --> + <context name="no_heredoc" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> + <DetectSpaces /> + <Detect2Chars attribute="Operator" char="<" char1="<" context="#pop"/> + <!-- comments --> + <RegExpr attribute="Comment" String="#\s*BEGIN.*$" context="#stay" beginRegion="marker" column="0"/> + <RegExpr attribute="Comment" String="#\s*END.*$" context="#stay" endRegion="marker" column="0"/> + <DetectChar attribute="Comment" char="#" context="General Comment"/> + </context> + <!-- General delimited input support The contexts below handle the various gdl formats --> @@ -892,7 +908,7 @@ <itemData name="Constant" defStyleNum="dsDataType"/> <itemData name="Constant Value" defStyleNum="dsDataType" color="#bb1188"/> <itemData name="Kernel methods" defStyleNum="dsNormal" color="#000080" selColor="#ffffff"/> <!-- #CC0E86 --> - <itemData name="Module mixin methods" defStyleNum="dsNormal" color="#000080" selColor="#ffffff"/> <!-- #CC0E86 --> + <itemData name="Module mixin methods" defStyleNum="dsNormal" color="#000080" selColor="#ffffff"/> <!-- #CC0E86 --> <itemData name="Member" defStyleNum="dsNormal"/> <itemData name="Instance Variable" defStyleNum="dsOthers"/> <itemData name="Class Variable" defStyleNum="dsOthers"/> @@ -913,3 +929,5 @@ <keywords casesensitive="1" weakDeliminator="!?"/> </general> </language> + +<!-- kate: replace-tabs off; --> diff --git a/src/libs/3rdparty/syntax-highlighting/data/syntax/yacc.xml b/src/libs/3rdparty/syntax-highlighting/data/syntax/yacc.xml index 6936c7a2de..06d6492ff1 100644 --- a/src/libs/3rdparty/syntax-highlighting/data/syntax/yacc.xml +++ b/src/libs/3rdparty/syntax-highlighting/data/syntax/yacc.xml @@ -32,7 +32,7 @@ This code is released under the LGPL as part of kdelibs/kate. ======================================================================== --> -<language name="Yacc/Bison" version="4" kateversion="2.4" section="Sources" extensions="*.y;*.yy;*.ypp;*.y++" mimetype="text/x-yacc;text/x-bison" priority="5" author="Jan Villat (jan.villat@net2000.ch)" license="LGPL"> +<language name="Yacc/Bison" version="5" kateversion="5.0" section="Sources" extensions="*.y;*.yy;*.ypp;*.y++" mimetype="text/x-yacc;text/x-bison" priority="5" author="Jan Villat (jan.villat@net2000.ch)" license="LGPL"> <highlighting> <contexts> @@ -200,9 +200,12 @@ This code is released under the LGPL as part of kdelibs/kate. </context> <context name="CommentStar" attribute="Comment" lineEndContext="#stay"> <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" /> + <IncludeRules context="##Alerts" /> + <IncludeRules context="##Modelines" /> </context> - <context name="CommentSlash" attribute="Comment" lineEndContext="#stay"> - <RegExpr attribute="Comment" context="#pop" String="[^\\]$" /> + <context name="CommentSlash" attribute="Comment" lineEndContext="#pop"> + <IncludeRules context="##Alerts" /> + <IncludeRules context="##Modelines" /> </context> <context name="StringOrChar" attribute="Normal Text" lineEndContext="#stay"> |