Warning, /frameworks/syntax-highlighting/data/syntax/javascript-react.xml is written in an unsupported language. File is not indexed.
0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <!DOCTYPE language
0003 [
0004 <!ENTITY simpleName "(?:[a-z][a-z\d]*:)?[a-z][a-z\d]*">
0005 <!ENTITY baseName "[a-zA-Z_\$[:^ascii:]](?:[\w\$\-\.[:^ascii:]]*[\w\$[:^ascii:]])?">
0006 <!ENTITY name "(?:&baseName;:)?&baseName;">
0007 <!ENTITY baseNameWithBound "(?:\b[a-zA-Z_\$]|[^[:ascii:]])(?:[\w\$\-\.[:^ascii:]]*[\w\$[:^ascii:]])?">
0008 <!ENTITY nameWithBound "(?:&baseNameWithBound;:)?&baseNameWithBound;"> <!-- Use this instead of "\b&name;" -->
0009
0010 <!ENTITY simpleTag "<\s*&simpleName;"> <!-- Element tag -->
0011 <!ENTITY tag "<\s*(?:&name;|>)">
0012 <!ENTITY entref "&(?:[a-zA-Z\d]+|#\d+|#x[a-fA-F\d]+);">
0013 <!ENTITY mlComment "/\*(?:[^\*]|\*+[^/\*])*\*+/">
0014 <!ENTITY endTagName "[\s<>]|/[>/\*]|$"> <!-- Delimiter of end of Tag name -->
0015
0016 <!ENTITY identifier "[a-zA-Z_$[:^ascii:]][\w$[:^ascii:]]*">
0017 ]>
0018
0019 <!--
0020 ====================================================================
0021
0022 This file is part of the KDE's KSyntaxHighlighting framework.
0023
0024 Copyright 2018-2020 Nibaldo González S. (nibgonz@gmail.com)
0025
0026 This Source Code Form is subject to the terms of the MIT License.
0027 If a copy of the license was not distributed with this file,
0028 You can obtain one at: https://opensource.org/licenses/MIT
0029
0030 ====================================================================
0031
0032 This file is an extension of the JavaScript highlighter
0033 (javascript.xml, Version 14 and higher).
0034 IMPORTANT: Keep sync with "typescript-react.xml".
0035
0036 Based on the XML syntax highlighting (v7), by Wilbert Berendsen
0037 (wilbert@kde.nl), and the TypeScript React grammar files,
0038 available at: https://github.com/Microsoft/TypeScript-TmLanguage
0039
0040 Change log:
0041 * v9 [2020-06-03]: Add folding in templates.
0042 * v8 [2019-11-21]: Tag detection is more stricter.
0043 * v7 [2019-11-19]: Rename definition "JavaScript React" to "JavaScript React (JSX)".
0044 * v5 [2019-02-20]: Don't highlight tags within declarations of
0045 types, variables, classes and interfaces.
0046 Fixes tags after substitutions in templates.
0047 Reorder part of the code.
0048 * v4 [2018-12-30]: Allow type assertion in the tag name.
0049 Allow tags after the keywords "await" & "yield".
0050 Allow empty tags and non-ASCII tag name & attributes.
0051 * v3 [2018-11-18]: Fix Doxygen comments & shebang. Remove TSX extension.
0052 * v2 [2018-08-18]: Remove "Conditional Expression" context.
0053 * v1 [2018-06-20]: Initial version
0054 -->
0055
0056 <language name="JavaScript React (JSX)" version="10" kateversion="5.53" section="Scripts" indenter="cstyle"
0057 priority="9" extensions="*.jsx" mimetype="text/jsx;text/x-jsx;application/jsx;application/x-jsx;"
0058 author="Nibaldo González (nibgonz@gmail.com)" license="MIT">
0059
0060 <highlighting>
0061
0062 <contexts>
0063
0064 <context name="Shebang" attribute="Normal Text" lineEndContext="#pop!Normal" lineEmptyContext="#pop!Normal" fallthrough="true" fallthroughContext="#pop!Normal">
0065 <Detect2Chars context="ShebangLine" attribute="Comment" char="#" char1="!" column="0" />
0066 </context>
0067 <context name="ShebangLine" attribute="Comment" lineEndContext="#pop#pop!Normal" />
0068
0069 <context name="Normal" attribute="Normal Text" lineEndContext="#stay">
0070 <IncludeRules context="React" />
0071 <IncludeRules context="Normal##JavaScript" />
0072 </context>
0073
0074 <!-- JavaScript -->
0075
0076 <!-- Overwrite rules of 'javascript.xml'. These rules send to contexts
0077 that contain: <IncludeRules context="Normal"/> in the JavaScript XML file. -->
0078 <context name="OverwriteJavaScript" attribute="Normal Text" lineEndContext="#stay">
0079 <DetectChar context="Template" attribute="Template" char="`" beginRegion="Template" />
0080 <DetectChar attribute="Normal Text" context="#stay" char="[" beginRegion="List" />
0081 <DetectChar attribute="Normal Text" context="NoRegExp##JavaScript" char="]" endRegion="List" />
0082 <!-- NOTE: The "{" character sends to the "Object" context (see the "React" context) -->
0083 </context>
0084 <context name="Object" attribute="Normal Text" lineEndContext="#stay">
0085 <DetectChar context="#pop" attribute="Normal Text" char="}" endRegion="Brace" />
0086 <IncludeRules context="React" />
0087 <RegExpr context="ConditionalExpression" attribute="Symbol" String="\?(?=[^\{\}]*&identifier;\s*\:)" />
0088 <IncludeRules context="Object##JavaScript" />
0089 </context>
0090 <context name="ConditionalExpression" attribute="Normal Text" lineEndContext="#pop">
0091 <DetectChar context="#pop" attribute="Symbol" char=":" />
0092 <IncludeRules context="React" />
0093 <IncludeRules context="ConditionalExpression##JavaScript" />
0094 </context>
0095 <context name="Template" attribute="Template" lineEndContext="#stay">
0096 <DetectChar context="RegExpAfterString##JavaScript" attribute="Template" char="`" endRegion="Template" />
0097 <!-- Find tags and send to the "Substitution" context -->
0098 <Detect2Chars context="Substitution-BeforeTag" attribute="Substitution" char="$" char1="{" />
0099 <IncludeRules context="Template##JavaScript" />
0100 </context>
0101 <context name="Substitution" attribute="Normal Text" lineEndContext="#stay">
0102 <DetectChar context="#pop" attribute="Substitution" char="}" />
0103 <IncludeRules context="React" />
0104 <IncludeRules context="Substitution##JavaScript" />
0105 </context>
0106
0107 <!-- Do not highlight tags in some special contexts -->
0108 <context name="FindDeclarationsWithNoTags" attribute="Normal Text" lineEndContext="#stay">
0109 <WordDetect context="InterfaceDeclaration" attribute="Reserved" String="interface" />
0110 <WordDetect context="ClassDeclaration" attribute="Reserved" String="class" />
0111 <WordDetect context="VarDeclaration" attribute="Reserved" String="let" />
0112 <WordDetect context="VarDeclaration" attribute="Keyword" String="var" />
0113 <WordDetect context="VarDeclaration" attribute="Keyword" String="const" />
0114 </context>
0115 <!-- Do not highlight tags after ":" in variable declarations -->
0116 <context name="VarDeclaration" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
0117 <DetectSpaces />
0118 <DetectChar context="#pop!NoTag" attribute="Symbol" char=":" />
0119 <RegExpr context="#stay" attribute="Normal Text" String="&identifier;(?=\s*(?:[\?!]\s*)?:)" />
0120 <AnyChar context="#stay" attribute="Symbol" String="?!" />
0121 <IncludeRules context="AllComments" />
0122 </context>
0123 <context name="NoTag" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
0124 <DetectSpaces />
0125 <IncludeRules context="AllComments" />
0126 <DetectChar context="#pop" attribute="Symbol" char="<" />
0127 <RegExpr context="#stay" attribute="Normal Text" String="\(\s*(?=<)" />
0128 <RegExpr context="#stay" attribute="Normal Text" String="\[\s*(?=<)" beginRegion="List" />
0129 <RegExpr context="#pop!Object" attribute="Normal Text" String="\{\s*<(\s*/(?![\*/]))?" beginRegion="Brace" />
0130 </context>
0131 <!-- Do not highlight tags in interface declarations -->
0132 <context name="InterfaceDeclaration" attribute="Normal Text" lineEndContext="#stay">
0133 <DetectChar context="#pop!InterfaceContentDeclaration" attribute="Normal Text" char="{" beginRegion="Brace" />
0134 <DetectChar context="#pop" char="}" lookAhead="true" />
0135 <IncludeRules context="Normal##JavaScript" />
0136 </context>
0137 <context name="InterfaceContentDeclaration" attribute="Normal Text" lineEndContext="#stay">
0138 <DetectChar context="#pop" attribute="Normal Text" char="}" endRegion="Brace" />
0139 <IncludeRules context="Object##JavaScript" />
0140 </context>
0141 <!-- Do not highlight tags in class declarations -->
0142 <context name="ClassDeclaration" attribute="Normal Text" lineEndContext="#stay">
0143 <DetectChar context="#pop!ClassDeclarationContent" attribute="Normal Text" char="{" beginRegion="Brace" />
0144 <DetectChar context="#pop" char="}" lookAhead="true" />
0145 <IncludeRules context="Normal##JavaScript" />
0146 </context>
0147 <context name="ClassDeclarationContent" attribute="Normal Text" lineEndContext="#stay">
0148 <DetectChar context="#pop" attribute="Normal Text" char="}" endRegion="Brace" />
0149 <DetectChar context="NoTag" attribute="Symbol" char=":" />
0150 <IncludeRules context="Object" />
0151 </context>
0152
0153 <!-- ReactJS -->
0154
0155 <!-- Tags highlighting -->
0156 <context name="React" attribute="Normal Text" lineEndContext="#stay">
0157 <!-- Tag in new line -->
0158 <RegExpr context="ValidTag" attribute="Normal Text" String="&tag;" firstNonSpace="true" lookAhead="true" />
0159 <!-- Highlight tags only after some keywords -->
0160 <RegExpr context="ValidTag" attribute="ControlFlow" String="\b(?:return|await)\s*(?=&tag;|/\*)" />
0161 <RegExpr context="ValidTag" attribute="Module" String="\b(?:default)\s*(?=&tag;|/\*)" />
0162 <RegExpr context="ValidTag" attribute="Reserved" String="\b(?:yield)\s*(?=&tag;|/\*)" />
0163
0164 <!-- Characters before a valid tag -->
0165 <RegExpr context="ValidTag" attribute="Special Operators" String="\=>\s*(?=&tag;|/\*)" />
0166 <RegExpr context="ValidTag" attribute="Symbol" String="(?:[,\=>:\*\?]|&&|\|\|)\s*(?=&tag;|/\*)" />
0167 <RegExpr context="ValidTag" attribute="Normal Text" String="\[\s*(?=&tag;|/\*)" beginRegion="List" />
0168 <RegExpr context="ValidTag" attribute="Normal Text" String="\(\s*(?=&tag;|/\*)" />
0169 <!-- The "Object-BeforeTag" context looks for a valid Tag and then sends the "Object" context -->
0170 <DetectChar context="Object-BeforeTag" attribute="Normal Text" char="{" beginRegion="Brace" />
0171
0172 <RegExpr context="ValidTag" attribute="Symbol" String="<\s*>\s*(?=&tag;|/\*)" />
0173
0174 <!-- Tag after a comment on a new line -->
0175 <Detect2Chars context="ValidTag" attribute="Comment" char="/" char1="*" firstNonSpace="true" lookAhead="true" />
0176
0177 <!-- Overwrite JavaScript rules to highlight tags within some contexts -->
0178 <IncludeRules context="FindDeclarationsWithNoTags" />
0179 <IncludeRules context="OverwriteJavaScript" />
0180 </context>
0181
0182 <!-- Detect tags before starting a context -->
0183 <context name="Object-BeforeTag" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop!Object">
0184 <IncludeRules context="ValidTag" />
0185 </context>
0186 <context name="Substitution-BeforeTag" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop!Substitution">
0187 <IncludeRules context="ValidTag" />
0188 </context>
0189 <context name="EvaluatedCode-BeforeTag" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop!EvaluatedCode">
0190 <IncludeRules context="ValidTag" />
0191 </context>
0192
0193 <!-- TAGS:
0194 NOTE & TODO: The following code is common for 'javascript-react.xml' and 'typescript-react.xml'
0195 and is replicated in both files. Look for some way to avoid having repeated code, for example,
0196 with a common XML file or with a generator script. The only drawback is that the
0197 "EvaluatedCode" context includes "Normal". -->
0198
0199 <!-- Highlight nested tags with comments in between.
0200 NOTE: The highlighting of Tags after a multiline comment does not work with: lineEndContext="#pop" -->
0201 <context name="ValidTag" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
0202 <RegExpr context="#stay" attribute="Normal Text" String="\s+(?=<|/\*)" />
0203 <IncludeRules context="FindTags" />
0204 <IncludeRules context="AllComments" />
0205 </context>
0206
0207 <!-- Start tag.
0208 There are two contexts to find Tags:
0209 * FindTags: For Tags within TypeScript code; invalid name tags aren't highlighted.
0210 * FindTagsInTagContent: For Tag within another tag; highlight any Tag.
0211 Tags with invalid names are highlighted as "Error".
0212 -->
0213 <context name="FindTags" attribute="Normal Text" lineEndContext="#stay">
0214 <!-- Invalid Tag, do not highlight tags in these cases:
0215 * "?" or "," after tag name:
0216 <Tag ? ...
0217 <Tag< ? ...
0218 <Tag /* comment */ ? ...
0219 * Invalid delimiter after comment (without spaces):
0220 <Tag/* comment */#
0221 -->
0222 <RegExpr context="#pop" attribute="Symbol" String="<(?=\s*&name;(?:(<(?:\s*&mlComment;)*)?(?:\s*&mlComment;)*\s*[\?,]|(?:&mlComment;)+(?!&endTagName;|&baseName;|\{)))" />
0223
0224 <!-- Empty tag (element) -->
0225 <RegExpr context="ElementTagContent" attribute="Element Tag" String="<\s*>" beginRegion="Element" />
0226 <!-- Detect Tags -->
0227 <RegExpr context="ElementTagFindType" attribute="Element Tag" String="&simpleTag;(?=&endTagName;)" beginRegion="Element" />
0228 <RegExpr context="ComponentTagFindType" attribute="Component Tag" String="&tag;(?=&endTagName;)" beginRegion="ComponentElement" />
0229 <!-- If a valid Tag was not detected -->
0230 <DetectChar context="#pop" attribute="Symbol" char="<" />
0231 </context>
0232
0233 <context name="FindTagsInTagContent" attribute="Normal Text" lineEndContext="#stay">
0234 <!-- Empty tag (element) -->
0235 <RegExpr context="ElementTagContent" attribute="Element Tag" String="<\s*>" beginRegion="Element" />
0236 <!-- Detect non-ASCII character in the tag name (component). This prevents highlighting as Element,
0237 tag names that don't start with a non-ASCII character. -->
0238 <RegExpr context="ComponentTagNonASCII" attribute="Component Tag" String="<\s*(?=(?:[a-z][a-z\d]*:)?(?:[a-z][a-z\d]*)?[^[:ascii:]])" beginRegion="ComponentElement" /> <!-- &simpleName; -->
0239 <!-- Element & component tags -->
0240 <RegExpr context="ElementTagFindType" attribute="Element Tag" String="&simpleTag;(?=[^\w\$\-\.:]|$|[\-\.]+(?:[^\w\$\-\.]|$)|:(?:[^a-zA-Z_\$]|$))" beginRegion="Element" />
0241 <RegExpr context="ComponentTagFindType" attribute="Component Tag" String="&tag;" beginRegion="ComponentElement" />
0242 </context>
0243 <!-- Highlight tag name with non-ASCII characters -->
0244 <context name="ComponentTagNonASCII" attribute="Normal Text" lineEndContext="#pop!ComponentTag" fallthrough="true" fallthroughContext="#pop!ComponentTag">
0245 <RegExpr context="#pop!ComponentTagFindType" attribute="Component Tag" String="&name;" />
0246 </context>
0247
0248 <context name="FindEntityRefs" attribute="Normal Text" lineEndContext="#stay">
0249 <RegExpr context="#stay" attribute="EntityRef" String="&entref;" />
0250 </context>
0251
0252 <!-- Type after the tag name. Ex: <C<number> /> -->
0253 <context name="ComponentTagFindType" attribute="Normal Text" lineEndContext="#pop!ComponentTag" fallthrough="true" fallthroughContext="#pop!ComponentTag">
0254 <DetectChar context="#pop!TypeInsideTag" attribute="Symbol" char="<" />
0255 </context>
0256 <context name="ElementTagFindType" attribute="Normal Text" lineEndContext="#pop!ElementTag" fallthrough="true" fallthroughContext="#pop!ElementTag">
0257 <DetectChar context="#pop!TypeInsideTag" attribute="Symbol" char="<" />
0258 </context>
0259
0260 <!-- Type assertion after the tag name -->
0261 <context name="TypeInsideTag" attribute="Component Tag" lineEndContext="#stay">
0262 <DetectChar context="#pop!ComponentTag" attribute="Symbol" char=">" />
0263 <IncludeRules context="DefaultTypeInsideTag" />
0264 </context>
0265 <context name="DefaultTypeInsideTag" attribute="Component Tag" lineEndContext="#stay">
0266 <DetectChar context="TypeInsideTag-AngleBracket" attribute="Symbol" char="<" />
0267 <DetectChar context="TypeInsideTag-CurlyBracket" attribute="Symbol" char="{" />
0268 <DetectChar context="TypeInsideTag-SquareBracket" attribute="Symbol" char="[" />
0269 <DetectChar context="TypeInsideTag-RoundBracket" attribute="Symbol" char="(" />
0270 <IncludeRules context="AllComments" />
0271 </context>
0272 <context name="TypeInsideTag-AngleBracket" attribute="Component Tag" lineEndContext="#stay">
0273 <DetectChar context="#pop" attribute="Symbol" char=">" />
0274 <IncludeRules context="DefaultTypeInsideTag" />
0275 </context>
0276 <context name="TypeInsideTag-CurlyBracket" attribute="Component Tag" lineEndContext="#stay">
0277 <DetectChar context="#pop" attribute="Symbol" char="}" />
0278 <IncludeRules context="DefaultTypeInsideTag" />
0279 </context>
0280 <context name="TypeInsideTag-SquareBracket" attribute="Component Tag" lineEndContext="#stay">
0281 <DetectChar context="#pop" attribute="Symbol" char="]" />
0282 <IncludeRules context="DefaultTypeInsideTag" />
0283 </context>
0284 <context name="TypeInsideTag-RoundBracket" attribute="Component Tag" lineEndContext="#stay">
0285 <DetectChar context="#pop" attribute="Symbol" char=")" />
0286 <IncludeRules context="DefaultTypeInsideTag" />
0287 </context>
0288
0289 <!-- Inside the tag -->
0290 <context name="ElementTag" attribute="Normal Text" lineEndContext="#stay">
0291 <Detect2Chars context="#pop" attribute="Element Tag" char="/" char1=">" endRegion="Element" />
0292 <DetectChar context="#pop!ElementTagContent" attribute="Element Tag" char=">" />
0293 <IncludeRules context="DefaultTag" />
0294 </context>
0295 <context name="ComponentTag" attribute="Normal Text" lineEndContext="#stay">
0296 <Detect2Chars context="#pop" attribute="Component Tag" char="/" char1=">" endRegion="ComponentElement" />
0297 <DetectChar context="#pop!ComponentTagContent" attribute="Component Tag" char=">" />
0298 <IncludeRules context="DefaultTag" />
0299 </context>
0300 <context name="DefaultTag" attribute="Normal Text" lineEndContext="#stay">
0301 <RegExpr context="Attribute" attribute="Attribute" String="&nameWithBound;" />
0302 <IncludeRules context="FindEvaluatedCode" />
0303 <IncludeRules context="AllComments" />
0304 <RegExpr context="#stay" attribute="Error" String="\S+&name;|\S" />
0305 </context>
0306
0307 <!-- Tag content: <Tag> content </Tag> -->
0308 <context name="ElementTagContent" attribute="Tag Content Text" lineEndContext="#stay">
0309 <RegExpr context="#pop" attribute="Element Tag" String="</\s*>" endRegion="Element" />
0310 <!-- With component tag (error) -->
0311 <RegExpr context="ElementTagEnd" attribute="Element Tag" String="</\s*(&simpleName;|(?=[A-Z_\$]))" />
0312 <IncludeRules context="DefaultTagContent" />
0313 </context>
0314 <context name="ComponentTagContent" attribute="Tag Content Text" lineEndContext="#stay">
0315 <RegExpr context="#pop" attribute="Component Tag" String="</\s*>" endRegion="ComponentElement" />
0316 <RegExpr context="ComponentTagEnd" attribute="Component Tag" String="</\s*&name;" />
0317 <IncludeRules context="DefaultTagContent" />
0318 </context>
0319 <context name="DefaultTagContent" attribute="Tag Content Text" lineEndContext="#stay">
0320 <IncludeRules context="FindTagsInTagContent" />
0321 <IncludeRules context="FindEntityRefs" />
0322 <IncludeRules context="FindEvaluatedCode" />
0323 <DetectChar context="#stay" attribute="Error" char="<" />
0324 </context>
0325
0326 <context name="ElementTagEnd" attribute="Normal Text" lineEndContext="#stay">
0327 <DetectChar context="#pop#pop" attribute="Element Tag" char=">" endRegion="Element" />
0328 <RegExpr context="#stay" attribute="Error" String="\S" />
0329 </context>
0330 <context name="ComponentTagEnd" attribute="Normal Text" lineEndContext="#stay">
0331 <DetectChar context="#pop#pop" attribute="Component Tag" char=">" endRegion="ComponentElement" />
0332 <RegExpr context="#stay" attribute="Error" String="\S" />
0333 </context>
0334
0335 <!-- Tag attribute -->
0336 <context name="Attribute" attribute="Normal Text" lineEndContext="#stay">
0337 <RegExpr context="#pop" attribute="Error" String="\=(?=\s*/?>)" />
0338 <DetectChar context="#pop!Value" attribute="Symbol" char="=" />
0339 <IncludeRules context="FindEndTag" />
0340 <DetectChar context="#pop" char="{" lookAhead="true" /> <!-- EvaluatedCode -->
0341 <IncludeRules context="AllComments" />
0342 <RegExpr context="#stay" attribute="Attribute" String="&nameWithBound;" />
0343 <RegExpr context="#stay" attribute="Error" String="\S+&name;|\S" />
0344 </context>
0345
0346 <context name="Value" attribute="Normal Text" lineEndContext="#stay">
0347 <DetectChar context="#pop!ValueDQ" attribute="Value" char=""" />
0348 <DetectChar context="#pop!ValueSQ" attribute="Value" char="'" />
0349 <DetectChar context="#pop" char="{" lookAhead="true" /> <!-- EvaluatedCode -->
0350 <IncludeRules context="FindEndTag" />
0351 <IncludeRules context="AllComments" />
0352 <RegExpr context="#stay" attribute="Error" String="\S" />
0353 </context>
0354 <context name="ValueDQ" attribute="Value" lineEndContext="#stay">
0355 <DetectChar context="#pop" attribute="Value" char=""" />
0356 <IncludeRules context="FindEntityRefs" />
0357 </context>
0358 <context name="ValueSQ" attribute="Value" lineEndContext="#stay">
0359 <DetectChar context="#pop" attribute="Value" char="'" />
0360 <IncludeRules context="FindEntityRefs" />
0361 </context>
0362
0363 <context name="FindEndTag" attribute="Normal Text" lineEndContext="#stay">
0364 <Detect2Chars context="#pop" char="/" char1=">" lookAhead="true" />
0365 <DetectChar context="#pop" char=">" lookAhead="true" />
0366 </context>
0367
0368 <context name="FindEvaluatedCode" attribute="Normal Text" lineEndContext="#stay">
0369 <!-- Find tags and send to the "EvaluatedCode" context -->
0370 <DetectChar context="EvaluatedCode-BeforeTag" attribute="Code Brackets" char="{" beginRegion="Code" />
0371 </context>
0372 <context name="EvaluatedCode" attribute="Normal Text" lineEndContext="#stay">
0373 <DetectChar context="#pop" attribute="Code Brackets" char="}" endRegion="Code" />
0374 <IncludeRules context="Normal" />
0375 </context>
0376
0377 <context name="AllComments" attribute="Normal Text" lineEndContext="#stay">
0378 <!-- TypeScript uses this for comments -->
0379 <IncludeRules context="FindComments##JavaScript" />
0380 </context>
0381
0382 </contexts>
0383
0384 <itemDatas>
0385 <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false" />
0386 <itemData name="Comment" defStyleNum="dsComment" />
0387
0388 <itemData name="Tag Content Text" defStyleNum="dsNormal" />
0389 <itemData name="Element Tag" defStyleNum="dsKeyword" spellChecking="false" />
0390 <itemData name="Component Tag" defStyleNum="dsFunction" bold="1" spellChecking="false" />
0391 <itemData name="Attribute" defStyleNum="dsOthers" spellChecking="false" />
0392 <itemData name="Value" defStyleNum="dsString" spellChecking="false" />
0393 <itemData name="EntityRef" defStyleNum="dsDecVal" spellChecking="false" />
0394 <itemData name="Code Brackets" defStyleNum="dsVariable" spellChecking="false" />
0395 <itemData name="Error" defStyleNum="dsError" spellChecking="false" />
0396
0397 <!-- itemDatas in JavaScript XML file -->
0398 <itemData name="Symbol" defStyleNum="dsOperator" />
0399 <itemData name="ControlFlow" defStyleNum="dsControlFlow" spellChecking="false" />
0400 <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false" />
0401 <itemData name="Reserved" defStyleNum="dsKeyword" italic="true" spellChecking="false" />
0402 <itemData name="Module" defStyleNum="dsImport" spellChecking="false" />
0403 <itemData name="Template" defStyleNum="dsVerbatimString" />
0404 <itemData name="Substitution" defStyleNum="dsSpecialChar" spellChecking="false" />
0405 <itemData name="Special Operators" defStyleNum="dsKeyword" spellChecking="false" />
0406 </itemDatas>
0407
0408 </highlighting>
0409
0410 <general>
0411 <keywords casesensitive="1" />
0412 <comments>
0413 <comment name="singleLine" start="//" />
0414 <comment name="multiLine" start="/*" end="*/" />
0415 </comments>
0416 </general>
0417
0418 </language>
0419 <!-- kate: replace-tabs off; tab-width 3; indent-width 3; remove-trailing-spaces mod; dynamic-word-wrap off; -->