Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/d.xml
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Line(s) | 3 | <!-- | |||
---|---|---|---|---|---|
91 | 2004.05.19 - D.XML 1.32 - D 0.77 - pragma, typeof - keywords are now supported. | 91 | 2004.05.19 - D.XML 1.32 - D 0.77 - pragma, typeof - keywords are now supported. | ||
92 | 2004.05.19 - D.XML 1.31 - D 0.76 - is - keyword is now supported. | 92 | 2004.05.19 - D.XML 1.31 - D 0.76 - is - keyword is now supported. | ||
93 | 2003.09.06 - D.XML 1.30 - D 0.71 - foreach - keyword is now supported. | 93 | 2003.09.06 - D.XML 1.30 - D 0.71 - foreach - keyword is now supported. | ||
94 | 2003.08.18 - D.XML 1.20 - D 0.69 - floats are now supported. | 94 | 2003.08.18 - D.XML 1.20 - D 0.69 - floats are now supported. | ||
95 | - embedded underscores in integer and float literals are now supported. | 95 | - embedded underscores in integer and float literals are now supported. | ||
96 | 2003.08.11 - D.XML 1.10 - updated. | 96 | 2003.08.11 - D.XML 1.10 - updated. | ||
97 | 2003.07.18 - D.XML 1.00 - First released. | 97 | 2003.07.18 - D.XML 1.00 - First released. | ||
98 | 98 | | |||
99 | TODO:- Deliminated strings and Token strings (D2.0) are not supported. | | |||
100 | | ||||
101 | ======================================================================== | 99 | ======================================================================== | ||
102 | --> | 100 | --> | ||
103 | 101 | | |||
104 | <language name="D" version="5" kateversion="5.0" section="Sources" extensions="*.d;*.D;*.di;*.DI;" mimetype="text/x-dsrc" casesensitive="true" author="Diggory Hardy (diggory.hardy@gmail.com), Aziz Köksal (aziz.koeksal@gmail.com), Jari-Matti Mäkelä (jmjm@iki.fi), Simon J Mackenzie (project.katedxml@smackoz.fastmail.fm)" license="LGPL"> | 102 | <language name="D" version="5" kateversion="5.0" section="Sources" extensions="*.d;*.D;*.di;*.DI;" mimetype="text/x-dsrc" casesensitive="true" author="Diggory Hardy (diggory.hardy@gmail.com), Aziz Köksal (aziz.koeksal@gmail.com), Jari-Matti Mäkelä (jmjm@iki.fi), Simon J Mackenzie (project.katedxml@smackoz.fastmail.fm)" license="LGPL"> | ||
105 | <highlighting> | 103 | <highlighting> | ||
106 | <!-- User-defined keywords (add identifiers you'd like highlighted here) --> | 104 | <!-- User-defined keywords (add identifiers you'd like highlighted here) --> | ||
107 | <list name="userkeywords"> | 105 | <list name="userkeywords"> | ||
108 | </list> | 106 | </list> | ||
▲ Show 20 Lines • Show All 302 Lines • ▼ Show 20 Line(s) | 381 | <context name="normal" attribute="Normal Text" lineEndContext="#stay"> | |||
411 | 409 | | |||
412 | <!-- Look ahead for a digit and switch to NumberLiteral context if found. --> | 410 | <!-- Look ahead for a digit and switch to NumberLiteral context if found. --> | ||
413 | <RegExpr context="NumberLiteral" String="\d" attribute="Normal Text" lookAhead="true"/> | 411 | <RegExpr context="NumberLiteral" String="\d" attribute="Normal Text" lookAhead="true"/> | ||
414 | 412 | | |||
415 | <!-- #line Integer [Filespec] --> | 413 | <!-- #line Integer [Filespec] --> | ||
416 | <StringDetect attribute="Pragma" context="LinePragma" String="#line"/> | 414 | <StringDetect attribute="Pragma" context="LinePragma" String="#line"/> | ||
417 | 415 | | |||
418 | <!-- Rules for the C-style indenter. Currently problems with /// and /++ comments. --> | 416 | <!-- Rules for the C-style indenter. Currently problems with /// and /++ comments. --> | ||
419 | <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="BraceA" /> | 417 | <DetectChar attribute="Symbol" context="BraceA" char="{" beginRegion="BraceA" /> | ||
420 | <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="BraceA" /> | | |||
421 | <AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/.*<=>?[]|~^;"/> | 418 | <AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/.*<=>?[]|~^;"/> | ||
422 | </context> | 419 | </context> | ||
423 | 420 | | |||
421 | <context name="BraceA" attribute="Normal Text" lineEndContext="#stay"> | ||||
422 | <DetectChar attribute="Symbol" context="#pop" char="}" endRegion="BraceA" /> | ||||
423 | <IncludeRules context="normal"/> | ||||
424 | </context> | ||||
425 | | ||||
424 | <context name="StartingLetter" attribute="Normal Text" lineEndContext="#pop"> | 426 | <context name="StartingLetter" attribute="Normal Text" lineEndContext="#pop"> | ||
425 | <DetectSpaces /> | 427 | <DetectSpaces /> | ||
426 | <!-- fall-through should work now that DetectIdentifier is used (without infinite loops) --> | 428 | <!-- fall-through should work now that DetectIdentifier is used (without infinite loops) --> | ||
427 | <!-- maybe not... got an infinite loop --> | 429 | <!-- maybe not... got an infinite loop --> | ||
428 | <RegExpr String="[^a-zA-Z_]" attribute="Normal Text" context="#pop" lookAhead="true"/> | 430 | <RegExpr String="[^a-zA-Z_]" attribute="Normal Text" context="#pop" lookAhead="true"/> | ||
429 | 431 | | |||
430 | <!-- detect whether scope, in, out, etc. are used as attributes or statements (etc.) --> | 432 | <!-- detect whether scope, in, out, etc. are used as attributes or statements (etc.) --> | ||
431 | <!-- rules cannot match across newlines unfortunately --> | 433 | <!-- rules cannot match across newlines unfortunately --> | ||
Show All 17 Lines | |||||
449 | <keyword String="tests" attribute="Tests" context="#stay" /> | 451 | <keyword String="tests" attribute="Tests" context="#stay" /> | ||
450 | <!-- These must use keyword not DetectString: DetectString does not check for word-break after string. --> | 452 | <!-- These must use keyword not DetectString: DetectString does not check for word-break after string. --> | ||
451 | <keyword String="pragma" attribute="Pragma" context="Pragma" /> | 453 | <keyword String="pragma" attribute="Pragma" context="Pragma" /> | ||
452 | <keyword String="version" attribute="Version" context="Version" /> | 454 | <keyword String="version" attribute="Version" context="Version" /> | ||
453 | <keyword String="deprecated" attribute="Deprecated" context="#stay" /> | 455 | <keyword String="deprecated" attribute="Deprecated" context="#stay" /> | ||
454 | 456 | | |||
455 | <Detect2Chars attribute="RawString" context="RawString" char="r" char1="""/> | 457 | <Detect2Chars attribute="RawString" context="RawString" char="r" char1="""/> | ||
456 | <Detect2Chars attribute="HexString" context="HexString" char="x" char1="""/> | 458 | <Detect2Chars attribute="HexString" context="HexString" char="x" char1="""/> | ||
459 | <Detect2Chars attribute="Token String Delimiter" context="TokenString" char="q" char1="{"/> | ||||
460 | <RegExpr attribute="Delimited String Delimiter" context="DelimStrHeredoc" String="q"([A-Za-z_][A-Za-z0-9_]*)$" /> | ||||
461 | <StringDetect attribute="Delimited String Delimiter" context="DelimStrBracket" String="q"[" /> | ||||
462 | <StringDetect attribute="Delimited String Delimiter" context="DelimStrParen" String="q"(" /> | ||||
463 | <StringDetect attribute="Delimited String Delimiter" context="DelimStrLtGt" String="q"<" /> | ||||
464 | <StringDetect attribute="Delimited String Delimiter" context="DelimStrBrace" String="q"{" /> | ||||
465 | <RegExpr attribute="Delimited String Delimiter" context="DelimStrSimple" String="q"([^A-Za-z_[(<{])" /> | ||||
457 | 466 | | |||
458 | <!-- user highlighting: last so as not to interfere with anything else --> | 467 | <!-- user highlighting: last so as not to interfere with anything else --> | ||
459 | <keyword String="userkeywords" attribute="UserKeywords" context="#stay" /> | 468 | <keyword String="userkeywords" attribute="UserKeywords" context="#stay" /> | ||
460 | 469 | | |||
461 | <DetectIdentifier /> | 470 | <DetectIdentifier /> | ||
462 | </context> | 471 | </context> | ||
463 | 472 | | |||
464 | <context name="Properties" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | 473 | <context name="Properties" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | ||
▲ Show 20 Lines • Show All 188 Lines • ▼ Show 20 Line(s) | 660 | <context name="String" attribute="String" lineEndContext="#stay"> | |||
653 | <Detect2Chars attribute="String" context="#pop" char=""" char1="c"/> | 662 | <Detect2Chars attribute="String" context="#pop" char=""" char1="c"/> | ||
654 | <Detect2Chars attribute="String" context="#pop" char=""" char1="w"/> | 663 | <Detect2Chars attribute="String" context="#pop" char=""" char1="w"/> | ||
655 | <Detect2Chars attribute="String" context="#pop" char=""" char1="d"/> | 664 | <Detect2Chars attribute="String" context="#pop" char=""" char1="d"/> | ||
656 | <DetectChar attribute="String" context="#pop" char="""/> | 665 | <DetectChar attribute="String" context="#pop" char="""/> | ||
657 | <Detect2Chars attribute="EscapeSequence" context="UnicodeShort" char="\" char1="u"/> | 666 | <Detect2Chars attribute="EscapeSequence" context="UnicodeShort" char="\" char1="u"/> | ||
658 | <Detect2Chars attribute="EscapeSequence" context="UnicodeLong" char="\" char1="U"/> | 667 | <Detect2Chars attribute="EscapeSequence" context="UnicodeLong" char="\" char1="U"/> | ||
659 | <Detect2Chars attribute="EscapeSequence" context="HTMLEntity" char="\" char1="&"/> | 668 | <Detect2Chars attribute="EscapeSequence" context="HTMLEntity" char="\" char1="&"/> | ||
660 | </context> | 669 | </context> | ||
670 | <!-- token strings: q{...} --> | ||||
671 | <context name="TokenString" attribute="Normal Text" lineEndContext="#stay"> | ||||
672 | <DetectChar attribute="Token String Delimiter" context="#pop" char="}" /> | ||||
673 | <IncludeRules context="normal" /> | ||||
674 | </context> | ||||
675 | <!-- delimited strings --> | ||||
676 | <!-- q"IDENTIFIER...IDENTIFIER" --> | ||||
677 | <context name="DelimStrHeredoc" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
678 | <RegExpr attribute="Delimited String Delimiter" context="#pop" String="^%1"" dynamic="true" /> | ||||
679 | <RegExpr attribute="Error" context="#pop" String="^%1" dynamic="true" /> | ||||
680 | </context> | ||||
681 | <!-- q"[...]" --> | ||||
682 | <context name="DelimStrBracket" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
683 | <DetectChar attribute="Delimited String Content" context="DelimStrBracket2" char="[" /> | ||||
684 | <Detect2Chars attribute="Delimited String Delimiter" context="#pop" char="]" char1=""" /> | ||||
685 | <DetectChar attribute="Error" context="#pop" char="]" /> | ||||
686 | </context> | ||||
687 | <context name="DelimStrBracket2" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
688 | <DetectChar attribute="Delimited String Content" context="DelimStrBracket2" char="[" /> | ||||
689 | <DetectChar attribute="Delimited String Content" context="#pop" char="]" /> | ||||
690 | </context> | ||||
691 | <!-- q"(...)" --> | ||||
692 | <context name="DelimStrParen" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
693 | <DetectChar attribute="Delimited String Content" context="DelimStrParen2" char="(" /> | ||||
694 | <Detect2Chars attribute="Delimited String Delimiter" context="#pop" char=")" char1=""" /> | ||||
695 | <DetectChar attribute="Error" context="#pop" char=")" /> | ||||
696 | </context> | ||||
697 | <context name="DelimStrParen2" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
698 | <DetectChar attribute="Delimited String Content" context="DelimStrParen2" char="(" /> | ||||
699 | <DetectChar attribute="Delimited String Content" context="#pop" char=")" /> | ||||
700 | </context> | ||||
701 | <!-- q"<...>" --> | ||||
702 | <context name="DelimStrLtGt" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
703 | <DetectChar attribute="Delimited String Content" context="DelimStrLtGt2" char="<" /> | ||||
704 | <Detect2Chars attribute="Delimited String Delimiter" context="#pop" char=">" char1=""" /> | ||||
705 | <DetectChar attribute="Error" context="#pop" char=">" /> | ||||
706 | </context> | ||||
707 | <context name="DelimStrLtGt2" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
708 | <DetectChar attribute="Delimited String Content" context="DelimStrLtGt2" char="<" /> | ||||
709 | <DetectChar attribute="Delimited String Content" context="#pop" char=">" /> | ||||
710 | </context> | ||||
711 | <!-- q"{...}" --> | ||||
712 | <context name="DelimStrBrace" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
713 | <DetectChar attribute="Delimited String Content" context="DelimStrBrace2" char="{" /> | ||||
714 | <Detect2Chars attribute="Delimited String Delimiter" context="#pop" char="}" char1=""" /> | ||||
715 | <DetectChar attribute="Error" context="#pop" char="}" /> | ||||
716 | </context> | ||||
717 | <context name="DelimStrBrace2" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
718 | <DetectChar attribute="Delimited String Content" context="DelimStrBrace2" char="{" /> | ||||
719 | <DetectChar attribute="Delimited String Content" context="#pop" char="}" /> | ||||
720 | </context> | ||||
721 | <!-- q"*...*" --> | ||||
722 | <context name="DelimStrSimple" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
723 | <RegExpr attribute="Delimited String Delimiter" context="#pop" String="%1"" dynamic="true" /> | ||||
724 | <RegExpr attribute="Error" context="#pop" String="%1" dynamic="true" /> | ||||
725 | </context> | ||||
661 | 726 | | |||
662 | <!-- Comments --> | 727 | <!-- Comments --> | ||
663 | <context name="CommentRules" attribute="Normal Text" lineEndContext="#pop"> | 728 | <context name="CommentRules" attribute="Normal Text" lineEndContext="#pop"> | ||
664 | <IncludeRules context="DdocNormal" /> | 729 | <IncludeRules context="DdocNormal" /> | ||
665 | <Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/> | 730 | <Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/> | ||
666 | <Detect2Chars attribute="Comment" context="CommentBlock" char="/" char1="*" beginRegion="CommentBlock"/> | 731 | <Detect2Chars attribute="Comment" context="CommentBlock" char="/" char1="*" beginRegion="CommentBlock"/> | ||
667 | <Detect2Chars attribute="Comment" context="CommentNested" char="/" char1="+" beginRegion="CommentNested"/> | 732 | <Detect2Chars attribute="Comment" context="CommentNested" char="/" char1="+" beginRegion="CommentNested"/> | ||
668 | <!-- This context is only for including rules from. --> | 733 | <!-- This context is only for including rules from. --> | ||
▲ Show 20 Lines • Show All 173 Lines • ▼ Show 20 Line(s) | 861 | <itemDatas> | |||
842 | <itemData name="Float" defStyleNum="dsFloat"/> | 907 | <itemData name="Float" defStyleNum="dsFloat"/> | ||
843 | 908 | | |||
844 | <itemData name="EscapeSequence" defStyleNum="dsSpecialChar"/> | 909 | <itemData name="EscapeSequence" defStyleNum="dsSpecialChar"/> | ||
845 | <itemData name="String" defStyleNum="dsString"/> | 910 | <itemData name="String" defStyleNum="dsString"/> | ||
846 | <itemData name="Char" defStyleNum="dsChar"/> | 911 | <itemData name="Char" defStyleNum="dsChar"/> | ||
847 | <itemData name="RawString" defStyleNum="dsVerbatimString"/> | 912 | <itemData name="RawString" defStyleNum="dsVerbatimString"/> | ||
848 | <itemData name="BQString" defStyleNum="dsSpecialString"/> | 913 | <itemData name="BQString" defStyleNum="dsSpecialString"/> | ||
849 | <itemData name="HexString" defStyleNum="dsSpecialString"/> | 914 | <itemData name="HexString" defStyleNum="dsSpecialString"/> | ||
915 | <itemData name="Token String Delimiter" defStyleNum="dsKeyword"/> | ||||
916 | <itemData name="Delimited String Content" defStyleNum="dsVerbatimString"/> | ||||
917 | <itemData name="Delimited String Delimiter" defStyleNum="dsKeyword"/> | ||||
850 | 918 | | |||
851 | <!-- Ddoc specific --> | 919 | <!-- Ddoc specific --> | ||
852 | <itemData name="Macros" defStyleNum="dsOthers" color="#bf5fbf" selColor="#ffffff" bold="1" italic="0" /> | 920 | <itemData name="Macros" defStyleNum="dsOthers" color="#bf5fbf" selColor="#ffffff" bold="1" italic="0" /> | ||
853 | <itemData name="Macro Text" defStyleNum="dsNormal" color="#bf7fff" selColor="#ffffff" bold="0" italic="0" /> | 921 | <itemData name="Macro Text" defStyleNum="dsNormal" color="#bf7fff" selColor="#ffffff" bold="0" italic="0" /> | ||
854 | <itemData name="Ddoc" defStyleNum="dsComment" color="#7f7fff" /> | 922 | <itemData name="Ddoc" defStyleNum="dsComment" color="#7f7fff" /> | ||
855 | <itemData name="DdocSection" defStyleNum="dsKeyword" color="#7f7fff" bold="1" /> | 923 | <itemData name="DdocSection" defStyleNum="dsKeyword" color="#7f7fff" bold="1" /> | ||
856 | <itemData name="DdocCode" defStyleNum="dsNormal" italic="1" /> | 924 | <itemData name="DdocCode" defStyleNum="dsNormal" italic="1" /> | ||
857 | </itemDatas> | 925 | </itemDatas> | ||
Show All 9 Lines |