aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/syntax-highlighting/data/generators/spdx-comments.xml.tpl
blob: ad13296c1dc0b6451af70aed6312778e9f5b9750 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language>
<!-- ***** THIS FILE WAS GENERATED BY A SCRIPT - DO NOT EDIT *****
  cd data/generators
  # increase version of spdx-comments.xml.tpl then
  ./generate-spdx-syntax.py > ../syntax/spdx-comments.xml
-->
<language
    version="6"
    kateversion="3.1"
    name="SPDX-Comments"
    section="Other"
    extensions=""
    mimetype=""
    author="Alex Turbov (i.zaufi@gmail.com)"
    license="MIT"
    hidden="true"
  >
  <highlighting>
    <list name="tags">
      <item>SPDX-License-Identifier:</item>
      <item>SPDX-FileContributor:</item>
      <item>SPDX-FileCopyrightText:</item>
      <item>SPDX-LicenseInfoInFile:</item>
    </list>

    <list name="operators">
      <item>AND</item>
      <item>OR</item>
      <item>WITH</item>
    </list>

    <list name="licenses">
      <!--[- for license in licenses if not license.isDeprecatedLicenseId ]-->
      <item><!--{ license.licenseId }--></item>
      <!--[- endfor ]-->
    </list>

    <list name="deprecated-licenses">
      <!--[- for license in licenses if license.isDeprecatedLicenseId ]-->
      <item><!--{ license.licenseId }--></item>
      <!--[- endfor ]-->
    </list>

    <list name="exceptions">
      <!--[- for exception in exceptions if not exception.isDeprecatedLicenseId ]-->
      <item><!--{ exception.licenseExceptionId }--></item>
      <!--[- endfor ]-->
    </list>

    <list name="deprecated-exceptions">
      <!--[- for exception in exceptions if exception.isDeprecatedLicenseId ]-->
      <item><!--{ exception.licenseExceptionId }--></item>
      <!--[- endfor ]-->
    </list>

    <contexts>

      <context name="Normal" attribute="SPDX Tag" lineEndContext="#pop">
        <WordDetect String="SPDX-License-Identifier:" attribute="SPDX Tag" context="license-expression" />
        <keyword String="tags" attribute="SPDX Tag" />
      </context>

      <context name="license-expression" attribute="SPDX Value" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
        <DetectSpaces/>
        <AnyChar String="()+" context="#stay" attribute="SPDX License Expression Operator" />
        <keyword String="licenses" context="#stay" attribute="SPDX License" />
        <keyword String="deprecated-licenses" context="#stay" attribute="SPDX Deprecated License" />
        <keyword String="exceptions" context="#stay" attribute="SPDX License Exception" />
        <keyword String="deprecated-exceptions" context="#stay" attribute="SPDX Deprecated License Exception" />
        <keyword String="operators" context="#stay" attribute="SPDX License Expression Operator" />
        <RegExpr attribute="SPDX License" context="#stay" String="\bLicenseRef-[^\s]+" />
      </context>

    </contexts>

    <itemDatas>
      <itemData name="SPDX Tag" defStyleNum="dsAnnotation" italic="true" spellChecking="false" />
      <itemData name="SPDX Value" defStyleNum="dsAnnotation" italic="true" spellChecking="false" />
      <itemData name="SPDX License" defStyleNum="dsAnnotation" italic="true" spellChecking="false" />
      <itemData name="SPDX License Exception" defStyleNum="dsAnnotation" italic="true" spellChecking="false" />
      <itemData name="SPDX Deprecated License" defStyleNum="dsAnnotation" italic="true" spellChecking="false" />
      <itemData name="SPDX Deprecated License Exception" defStyleNum="dsAnnotation" italic="true" spellChecking="false" />
      <itemData name="SPDX License Expression Operator" defStyleNum="dsOperator" italic="true" spellChecking="false" />
    </itemDatas>

  </highlighting>

  <general>
    <keywords casesensitive="1" weakDeliminator=":-." />
  </general>

</language>
<!-- kate: indent-width 2; -->