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="3" 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="3" 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 294 Lines • ▼ Show 20 Line(s) | 373 | <context name="normal" attribute="Normal Text" lineEndContext="#stay"> | |||
403 | 401 | | |||
404 | <!-- Look ahead for a digit and switch to NumberLiteral context if found. --> | 402 | <!-- Look ahead for a digit and switch to NumberLiteral context if found. --> | ||
405 | <RegExpr context="NumberLiteral" String="\d" attribute="Normal Text" lookAhead="true"/> | 403 | <RegExpr context="NumberLiteral" String="\d" attribute="Normal Text" lookAhead="true"/> | ||
406 | 404 | | |||
407 | <!-- #line Integer [Filespec] --> | 405 | <!-- #line Integer [Filespec] --> | ||
408 | <StringDetect attribute="Pragma" context="LinePragma" String="#line"/> | 406 | <StringDetect attribute="Pragma" context="LinePragma" String="#line"/> | ||
409 | 407 | | |||
410 | <!-- Rules for the C-style indenter. Currently problems with /// and /++ comments. --> | 408 | <!-- Rules for the C-style indenter. Currently problems with /// and /++ comments. --> | ||
411 | <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="BraceA" /> | 409 | <DetectChar attribute="Symbol" context="BraceA" char="{" beginRegion="BraceA" /> | ||
412 | <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="BraceA" /> | | |||
413 | <AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/.*<=>?[]|~^;"/> | 410 | <AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/.*<=>?[]|~^;"/> | ||
414 | </context> | 411 | </context> | ||
415 | 412 | | |||
413 | <context name="BraceA" attribute="Normal Text"> | ||||
414 | <DetectChar attribute="Symbol" context="#pop" char="}" endRegion="BraceA" /> | ||||
415 | <IncludeRules context="normal"/> | ||||
416 | </context> | ||||
417 | | ||||
416 | <context name="StartingLetter" attribute="Normal Text" lineEndContext="#pop"> | 418 | <context name="StartingLetter" attribute="Normal Text" lineEndContext="#pop"> | ||
417 | <DetectSpaces /> | 419 | <DetectSpaces /> | ||
418 | <!-- fall-through should work now that DetectIdentifier is used (without infinite loops) --> | 420 | <!-- fall-through should work now that DetectIdentifier is used (without infinite loops) --> | ||
419 | <!-- maybe not... got an infinite loop --> | 421 | <!-- maybe not... got an infinite loop --> | ||
420 | <RegExpr String="[^a-zA-Z_]" attribute="Normal Text" context="#pop" lookAhead="true"/> | 422 | <RegExpr String="[^a-zA-Z_]" attribute="Normal Text" context="#pop" lookAhead="true"/> | ||
421 | 423 | | |||
422 | <!-- detect whether scope, in, out, etc. are used as attributes or statements (etc.) --> | 424 | <!-- detect whether scope, in, out, etc. are used as attributes or statements (etc.) --> | ||
423 | <!-- rules cannot match across newlines unfortunately --> | 425 | <!-- rules cannot match across newlines unfortunately --> | ||
Show All 17 Lines | |||||
441 | <keyword String="tests" attribute="Tests" context="#stay" /> | 443 | <keyword String="tests" attribute="Tests" context="#stay" /> | ||
442 | <!-- These must use keyword not DetectString: DetectString does not check for word-break after string. --> | 444 | <!-- These must use keyword not DetectString: DetectString does not check for word-break after string. --> | ||
443 | <keyword String="pragma" attribute="Pragma" context="Pragma" /> | 445 | <keyword String="pragma" attribute="Pragma" context="Pragma" /> | ||
444 | <keyword String="version" attribute="Version" context="Version" /> | 446 | <keyword String="version" attribute="Version" context="Version" /> | ||
445 | <keyword String="deprecated" attribute="Deprecated" context="#stay" /> | 447 | <keyword String="deprecated" attribute="Deprecated" context="#stay" /> | ||
446 | 448 | | |||
447 | <Detect2Chars attribute="RawString" context="RawString" char="r" char1="""/> | 449 | <Detect2Chars attribute="RawString" context="RawString" char="r" char1="""/> | ||
448 | <Detect2Chars attribute="HexString" context="HexString" char="x" char1="""/> | 450 | <Detect2Chars attribute="HexString" context="HexString" char="x" char1="""/> | ||
451 | <Detect2Chars attribute="Token String Delimiter" context="TokenString" char="q" char1="{"/> | ||||
452 | <RegExpr attribute="Delimited String Delimiter" context="DelimStrHeredoc" String="q"([A-Za-z_][A-Za-z0-9_]*)$" /> | ||||
453 | <StringDetect attribute="Delimited String Delimiter" context="DelimStrBracket" String="q"[" /> | ||||
454 | <StringDetect attribute="Delimited String Delimiter" context="DelimStrParen" String="q"(" /> | ||||
455 | <StringDetect attribute="Delimited String Delimiter" context="DelimStrLtGt" String="q"<" /> | ||||
456 | <StringDetect attribute="Delimited String Delimiter" context="DelimStrBrace" String="q"{" /> | ||||
457 | <RegExpr attribute="Delimited String Delimiter" context="DelimStrSimple" String="q"([^A-Za-z_[(<{])" /> | ||||
449 | 458 | | |||
450 | <!-- user highlighting: last so as not to interfere with anything else --> | 459 | <!-- user highlighting: last so as not to interfere with anything else --> | ||
451 | <keyword String="userkeywords" attribute="UserKeywords" context="#stay" /> | 460 | <keyword String="userkeywords" attribute="UserKeywords" context="#stay" /> | ||
452 | 461 | | |||
453 | <DetectIdentifier /> | 462 | <DetectIdentifier /> | ||
454 | </context> | 463 | </context> | ||
455 | 464 | | |||
456 | <context name="Properties" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | 465 | <context name="Properties" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | ||
▲ Show 20 Lines • Show All 149 Lines • ▼ Show 20 Line(s) | 613 | <context name="String" attribute="String" lineEndContext="#stay"> | |||
606 | <Detect2Chars attribute="String" context="#pop" char=""" char1="c"/> | 615 | <Detect2Chars attribute="String" context="#pop" char=""" char1="c"/> | ||
607 | <Detect2Chars attribute="String" context="#pop" char=""" char1="w"/> | 616 | <Detect2Chars attribute="String" context="#pop" char=""" char1="w"/> | ||
608 | <Detect2Chars attribute="String" context="#pop" char=""" char1="d"/> | 617 | <Detect2Chars attribute="String" context="#pop" char=""" char1="d"/> | ||
609 | <DetectChar attribute="String" context="#pop" char="""/> | 618 | <DetectChar attribute="String" context="#pop" char="""/> | ||
610 | <Detect2Chars attribute="EscapeSequence" context="UnicodeShort" char="\" char1="u"/> | 619 | <Detect2Chars attribute="EscapeSequence" context="UnicodeShort" char="\" char1="u"/> | ||
611 | <Detect2Chars attribute="EscapeSequence" context="UnicodeLong" char="\" char1="U"/> | 620 | <Detect2Chars attribute="EscapeSequence" context="UnicodeLong" char="\" char1="U"/> | ||
612 | <Detect2Chars attribute="EscapeSequence" context="HTMLEntity" char="\" char1="&"/> | 621 | <Detect2Chars attribute="EscapeSequence" context="HTMLEntity" char="\" char1="&"/> | ||
613 | </context> | 622 | </context> | ||
623 | <!-- token strings: q{...} --> | ||||
624 | <context name="TokenString" attribute="Normal Text" lineEndContext="#stay"> | ||||
625 | <DetectChar attribute="Token String Delimiter" context="#pop" char="}" /> | ||||
626 | <IncludeRules context="normal" /> | ||||
627 | </context> | ||||
628 | <!-- delimited strings --> | ||||
629 | <!-- q"IDENTIFIER...IDENTIFIER" --> | ||||
630 | <context name="DelimStrHeredoc" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
631 | <RegExpr attribute="Delimited String Delimiter" context="#pop" String="^%1"" dynamic="true" /> | ||||
632 | <RegExpr attribute="Error" context="#pop" String="^%1" dynamic="true" /> | ||||
633 | </context> | ||||
634 | <!-- q"[...]" --> | ||||
635 | <context name="DelimStrBracket" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
636 | <DetectChar attribute="Delimited String Content" context="DelimStrBracket2" char="[" /> | ||||
637 | <Detect2Chars attribute="Delimited String Delimiter" context="#pop" char="]" char1=""" /> | ||||
638 | <DetectChar attribute="Error" context="#pop" char="]" /> | ||||
639 | </context> | ||||
640 | <context name="DelimStrBracket2" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
641 | <DetectChar attribute="Delimited String Content" context="DelimStrBracket2" char="[" /> | ||||
642 | <DetectChar attribute="Delimited String Content" context="#pop" char="]" /> | ||||
643 | </context> | ||||
644 | <!-- q"(...)" --> | ||||
645 | <context name="DelimStrParen" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
646 | <DetectChar attribute="Delimited String Content" context="DelimStrParen2" char="(" /> | ||||
647 | <Detect2Chars attribute="Delimited String Delimiter" context="#pop" char=")" char1=""" /> | ||||
648 | <DetectChar attribute="Error" context="#pop" char=")" /> | ||||
649 | </context> | ||||
650 | <context name="DelimStrParen2" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
651 | <DetectChar attribute="Delimited String Content" context="DelimStrParen2" char="(" /> | ||||
652 | <DetectChar attribute="Delimited String Content" context="#pop" char=")" /> | ||||
653 | </context> | ||||
654 | <!-- q"<...>" --> | ||||
655 | <context name="DelimStrLtGt" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
656 | <DetectChar attribute="Delimited String Content" context="DelimStrLtGt2" char="<" /> | ||||
657 | <Detect2Chars attribute="Delimited String Delimiter" context="#pop" char=">" char1=""" /> | ||||
658 | <DetectChar attribute="Error" context="#pop" char=">" /> | ||||
659 | </context> | ||||
660 | <context name="DelimStrLtGt2" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
661 | <DetectChar attribute="Delimited String Content" context="DelimStrLtGt2" char="<" /> | ||||
662 | <DetectChar attribute="Delimited String Content" context="#pop" char=">" /> | ||||
663 | </context> | ||||
664 | <!-- q"{...}" --> | ||||
665 | <context name="DelimStrBrace" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
666 | <DetectChar attribute="Delimited String Content" context="DelimStrBrace2" char="{" /> | ||||
667 | <Detect2Chars attribute="Delimited String Delimiter" context="#pop" char="}" char1=""" /> | ||||
668 | <DetectChar attribute="Error" context="#pop" char="}" /> | ||||
669 | </context> | ||||
670 | <context name="DelimStrBrace2" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
671 | <DetectChar attribute="Delimited String Content" context="DelimStrBrace2" char="{" /> | ||||
672 | <DetectChar attribute="Delimited String Content" context="#pop" char="}" /> | ||||
673 | </context> | ||||
674 | <!-- q"*...*" --> | ||||
675 | <context name="DelimStrSimple" attribute="Delimited String Content" lineEndContext="#stay"> | ||||
676 | <RegExpr attribute="Delimited String Delimiter" context="#pop" String="%1"" dynamic="true" /> | ||||
677 | <RegExpr attribute="Error" context="#pop" String="%1" dynamic="true" /> | ||||
678 | </context> | ||||
614 | 679 | | |||
615 | <!-- Comments --> | 680 | <!-- Comments --> | ||
616 | <context name="CommentRules" attribute="Normal Text" lineEndContext="#pop"> | 681 | <context name="CommentRules" attribute="Normal Text" lineEndContext="#pop"> | ||
617 | <IncludeRules context="DdocNormal" /> | 682 | <IncludeRules context="DdocNormal" /> | ||
618 | <Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/> | 683 | <Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/> | ||
619 | <Detect2Chars attribute="Comment" context="CommentBlock" char="/" char1="*" beginRegion="CommentBlock"/> | 684 | <Detect2Chars attribute="Comment" context="CommentBlock" char="/" char1="*" beginRegion="CommentBlock"/> | ||
620 | <Detect2Chars attribute="Comment" context="CommentNested" char="/" char1="+" beginRegion="CommentNested"/> | 685 | <Detect2Chars attribute="Comment" context="CommentNested" char="/" char1="+" beginRegion="CommentNested"/> | ||
621 | <!-- This context is only for including rules from. --> | 686 | <!-- This context is only for including rules from. --> | ||
▲ Show 20 Lines • Show All 173 Lines • ▼ Show 20 Line(s) | 814 | <itemDatas> | |||
795 | <itemData name="Float" defStyleNum="dsFloat"/> | 860 | <itemData name="Float" defStyleNum="dsFloat"/> | ||
796 | 861 | | |||
797 | <itemData name="EscapeSequence" defStyleNum="dsSpecialChar"/> | 862 | <itemData name="EscapeSequence" defStyleNum="dsSpecialChar"/> | ||
798 | <itemData name="String" defStyleNum="dsString"/> | 863 | <itemData name="String" defStyleNum="dsString"/> | ||
799 | <itemData name="Char" defStyleNum="dsChar"/> | 864 | <itemData name="Char" defStyleNum="dsChar"/> | ||
800 | <itemData name="RawString" defStyleNum="dsVerbatimString"/> | 865 | <itemData name="RawString" defStyleNum="dsVerbatimString"/> | ||
801 | <itemData name="BQString" defStyleNum="dsSpecialString"/> | 866 | <itemData name="BQString" defStyleNum="dsSpecialString"/> | ||
802 | <itemData name="HexString" defStyleNum="dsSpecialString"/> | 867 | <itemData name="HexString" defStyleNum="dsSpecialString"/> | ||
868 | <itemData name="Token String Delimiter" defStyleNum="dsKeyword"/> | ||||
869 | <itemData name="Delimited String Content" defStyleNum="dsVerbatimString"/> | ||||
870 | <itemData name="Delimited String Delimiter" defStyleNum="dsKeyword"/> | ||||
803 | 871 | | |||
804 | <!-- Ddoc specific --> | 872 | <!-- Ddoc specific --> | ||
805 | <itemData name="Macros" defStyleNum="dsOthers" color="#bf5fbf" selColor="#ffffff" bold="1" italic="0" /> | 873 | <itemData name="Macros" defStyleNum="dsOthers" color="#bf5fbf" selColor="#ffffff" bold="1" italic="0" /> | ||
806 | <itemData name="Macro Text" defStyleNum="dsNormal" color="#bf7fff" selColor="#ffffff" bold="0" italic="0" /> | 874 | <itemData name="Macro Text" defStyleNum="dsNormal" color="#bf7fff" selColor="#ffffff" bold="0" italic="0" /> | ||
807 | <itemData name="Ddoc" defStyleNum="dsComment" color="#7f7fff" /> | 875 | <itemData name="Ddoc" defStyleNum="dsComment" color="#7f7fff" /> | ||
808 | <itemData name="DdocSection" defStyleNum="dsKeyword" color="#7f7fff" bold="1" /> | 876 | <itemData name="DdocSection" defStyleNum="dsKeyword" color="#7f7fff" bold="1" /> | ||
809 | <itemData name="DdocCode" defStyleNum="dsNormal" italic="1" /> | 877 | <itemData name="DdocCode" defStyleNum="dsNormal" italic="1" /> | ||
810 | </itemDatas> | 878 | </itemDatas> | ||
Show All 9 Lines |