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. | 99 | TODO:- Deliminated strings (D2.0) are not supported. | ||
100 | 100 | | |||
101 | ======================================================================== | 101 | ======================================================================== | ||
102 | --> | 102 | --> | ||
103 | 103 | | |||
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"> | 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"> | ||
105 | <highlighting> | 105 | <highlighting> | ||
106 | <!-- User-defined keywords (add identifiers you'd like highlighted here) --> | 106 | <!-- User-defined keywords (add identifiers you'd like highlighted here) --> | ||
107 | <list name="userkeywords"> | 107 | <list name="userkeywords"> | ||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 138 | <list name="attributes"> | |||
150 | <item>nothrow</item> | 150 | <item>nothrow</item> | ||
151 | <item>override</item> | 151 | <item>override</item> | ||
152 | <item>package</item> | 152 | <item>package</item> | ||
153 | <item>private</item> | 153 | <item>private</item> | ||
154 | <item>protected</item> | 154 | <item>protected</item> | ||
155 | <item>public</item> | 155 | <item>public</item> | ||
156 | <item>pure</item> | 156 | <item>pure</item> | ||
157 | <item>ref</item> | 157 | <item>ref</item> | ||
158 | <item>shared</item> | ||||
158 | <item>static</item> | 159 | <item>static</item> | ||
159 | 160 | | |||
160 | <!-- these may be statements --> | 161 | <!-- these may be statements --> | ||
161 | <!-- in (more common to use as an expression since in attribute is only ever the default) --> | 162 | <!-- in (more common to use as an expression since in attribute is only ever the default) --> | ||
162 | <item>out</item> | 163 | <item>out</item> | ||
163 | <item>scope</item> | 164 | <item>scope</item> | ||
165 | | ||||
166 | <item>__gshared</item> | ||||
164 | </list> | 167 | </list> | ||
165 | 168 | | |||
166 | <list name="expressions"> | 169 | <list name="expressions"> | ||
167 | <!-- primary expressions --> | 170 | <!-- primary expressions --> | ||
168 | <item>false</item> | 171 | <item>false</item> | ||
169 | <item>null</item> | 172 | <item>null</item> | ||
170 | <item>super</item> | 173 | <item>super</item> | ||
171 | <item>this</item> | 174 | <item>this</item> | ||
▲ Show 20 Lines • Show All 231 Lines • ▼ Show 20 Line(s) | 378 | <context name="normal" attribute="Normal Text" lineEndContext="#stay"> | |||
403 | 406 | | |||
404 | <!-- Look ahead for a digit and switch to NumberLiteral context if found. --> | 407 | <!-- Look ahead for a digit and switch to NumberLiteral context if found. --> | ||
405 | <RegExpr context="NumberLiteral" String="\d" attribute="Normal Text" lookAhead="true"/> | 408 | <RegExpr context="NumberLiteral" String="\d" attribute="Normal Text" lookAhead="true"/> | ||
406 | 409 | | |||
407 | <!-- #line Integer [Filespec] --> | 410 | <!-- #line Integer [Filespec] --> | ||
408 | <StringDetect attribute="Pragma" context="LinePragma" String="#line"/> | 411 | <StringDetect attribute="Pragma" context="LinePragma" String="#line"/> | ||
409 | 412 | | |||
410 | <!-- Rules for the C-style indenter. Currently problems with /// and /++ comments. --> | 413 | <!-- Rules for the C-style indenter. Currently problems with /// and /++ comments. --> | ||
411 | <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="BraceA" /> | 414 | <DetectChar attribute="Symbol" context="BraceA" char="{" beginRegion="BraceA" /> | ||
412 | <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="BraceA" /> | | |||
413 | <AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/.*<=>?[]|~^;"/> | 415 | <AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/.*<=>?[]|~^;"/> | ||
414 | </context> | 416 | </context> | ||
415 | 417 | | |||
418 | <context name="BraceA" attribute="Normal Text"> | ||||
419 | <DetectChar attribute="Symbol" context="#pop" char="}" endRegion="BraceA" /> | ||||
420 | <IncludeRules context="normal"/> | ||||
421 | </context> | ||||
422 | | ||||
416 | <context name="StartingLetter" attribute="Normal Text" lineEndContext="#pop"> | 423 | <context name="StartingLetter" attribute="Normal Text" lineEndContext="#pop"> | ||
417 | <DetectSpaces /> | 424 | <DetectSpaces /> | ||
418 | <!-- fall-through should work now that DetectIdentifier is used (without infinite loops) --> | 425 | <!-- fall-through should work now that DetectIdentifier is used (without infinite loops) --> | ||
419 | <!-- maybe not... got an infinite loop --> | 426 | <!-- maybe not... got an infinite loop --> | ||
420 | <RegExpr String="[^a-zA-Z_]" attribute="Normal Text" context="#pop" lookAhead="true"/> | 427 | <RegExpr String="[^a-zA-Z_]" attribute="Normal Text" context="#pop" lookAhead="true"/> | ||
421 | 428 | | |||
422 | <!-- detect whether scope, in, out, etc. are used as attributes or statements (etc.) --> | 429 | <!-- detect whether scope, in, out, etc. are used as attributes or statements (etc.) --> | ||
423 | <!-- rules cannot match across newlines unfortunately --> | 430 | <!-- rules cannot match across newlines unfortunately --> | ||
Show All 17 Lines | |||||
441 | <keyword String="tests" attribute="Tests" context="#stay" /> | 448 | <keyword String="tests" attribute="Tests" context="#stay" /> | ||
442 | <!-- These must use keyword not DetectString: DetectString does not check for word-break after string. --> | 449 | <!-- These must use keyword not DetectString: DetectString does not check for word-break after string. --> | ||
443 | <keyword String="pragma" attribute="Pragma" context="Pragma" /> | 450 | <keyword String="pragma" attribute="Pragma" context="Pragma" /> | ||
444 | <keyword String="version" attribute="Version" context="Version" /> | 451 | <keyword String="version" attribute="Version" context="Version" /> | ||
445 | <keyword String="deprecated" attribute="Deprecated" context="#stay" /> | 452 | <keyword String="deprecated" attribute="Deprecated" context="#stay" /> | ||
446 | 453 | | |||
447 | <Detect2Chars attribute="RawString" context="RawString" char="r" char1="""/> | 454 | <Detect2Chars attribute="RawString" context="RawString" char="r" char1="""/> | ||
448 | <Detect2Chars attribute="HexString" context="HexString" char="x" char1="""/> | 455 | <Detect2Chars attribute="HexString" context="HexString" char="x" char1="""/> | ||
456 | <Detect2Chars attribute="TokenString" context="TokenString" char="q" char1="{"/> | ||||
449 | 457 | | |||
450 | <!-- user highlighting: last so as not to interfere with anything else --> | 458 | <!-- user highlighting: last so as not to interfere with anything else --> | ||
451 | <keyword String="userkeywords" attribute="UserKeywords" context="#stay" /> | 459 | <keyword String="userkeywords" attribute="UserKeywords" context="#stay" /> | ||
452 | 460 | | |||
453 | <DetectIdentifier /> | 461 | <DetectIdentifier /> | ||
454 | </context> | 462 | </context> | ||
455 | 463 | | |||
456 | <context name="Properties" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | 464 | <context name="Properties" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | ||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | |||||
507 | <context name="Linkage" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | 515 | <context name="Linkage" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | ||
508 | <DetectSpaces/> | 516 | <DetectSpaces/> | ||
509 | <DetectChar attribute="Normal Text" context="Linkage2" char="("/> | 517 | <DetectChar attribute="Normal Text" context="Linkage2" char="("/> | ||
510 | <IncludeRules context="CommentRules" /> | 518 | <IncludeRules context="CommentRules" /> | ||
511 | </context> | 519 | </context> | ||
512 | <context name="Linkage2" attribute="Normal Text" lineEndContext="#stay"> | 520 | <context name="Linkage2" attribute="Normal Text" lineEndContext="#stay"> | ||
513 | <DetectSpaces/> | 521 | <DetectSpaces/> | ||
514 | <StringDetect attribute="Linkage Type" context="#pop#pop" String="C++"/> | 522 | <StringDetect attribute="Linkage Type" context="#pop#pop" String="C++"/> | ||
515 | <keyword attribute="Linkage Type" context="#pop#pop" String="ltypes"/> | 523 | <keyword attribute="Linkage Type" context="#stay" String="ltypes"/> | ||
516 | <IncludeRules context="CommentRules" /> | 524 | <IncludeRules context="CommentRules" /> | ||
517 | <!-- Fall-through rules, highlighting errors: --> | 525 | <!-- Fall-through rules, highlighting errors: --> | ||
518 | <DetectChar char=")" attribute="Normal Text" context="#pop#pop"/> | 526 | <DetectChar char=")" attribute="Normal Text" context="#pop#pop"/> | ||
519 | <RegExpr String="[^)\s\n]+" attribute="Error" context="#pop#pop"/> | 527 | <RegExpr String="[^)\s\n]+" attribute="Error" context="#pop#pop"/> | ||
520 | </context> | 528 | </context> | ||
521 | 529 | | |||
522 | <context name="Version" attribute="Normal Text" lineEndContext="#stay"> | 530 | <context name="Version" attribute="Normal Text" lineEndContext="#stay"> | ||
523 | <DetectSpaces/> | 531 | <DetectSpaces/> | ||
Show All 32 Lines | 563 | <context name="Pragma" attribute="Pragma" lineEndContext="#stay"> | |||
556 | <DetectSpaces/> | 564 | <DetectSpaces/> | ||
557 | <DetectChar attribute="Normal Text" context="Pragma2" char="("/> | 565 | <DetectChar attribute="Normal Text" context="Pragma2" char="("/> | ||
558 | <IncludeRules context="CommentRules" /> | 566 | <IncludeRules context="CommentRules" /> | ||
559 | <!-- Fall-through rules, highlighting errors: --> | 567 | <!-- Fall-through rules, highlighting errors: --> | ||
560 | <RegExpr String="[^\s\n]+" attribute="Error" context="#pop"/> | 568 | <RegExpr String="[^\s\n]+" attribute="Error" context="#pop"/> | ||
561 | </context> | 569 | </context> | ||
562 | <context name="Pragma2" attribute="Pragma" lineEndContext="#stay"> | 570 | <context name="Pragma2" attribute="Pragma" lineEndContext="#stay"> | ||
563 | <DetectSpaces/> | 571 | <DetectSpaces/> | ||
564 | <keyword attribute="Version Type" context="#pop#pop" String="ptypes"/> | 572 | <keyword attribute="Version Type" context="#stay" String="ptypes"/> | ||
565 | <DetectIdentifier attribute="Normal Text" context="#pop#pop"/> | 573 | <DetectIdentifier attribute="Normal Text" context="#stay"/> | ||
566 | <IncludeRules context="CommentRules" /> | 574 | <IncludeRules context="CommentRules" /> | ||
567 | <!-- Fall-through rules, highlighting errors: --> | 575 | <!-- Fall-through rules, highlighting errors: --> | ||
568 | <DetectChar char=")" attribute="Normal Text" context="#pop#pop"/> | 576 | <DetectChar char=")" attribute="Normal Text" context="#pop#pop"/> | ||
569 | <RegExpr String="[^)\s\n]+" attribute="Error" context="#pop#pop"/> | 577 | <RegExpr String="[^)\s\n]+" attribute="Error" context="#pop#pop"/> | ||
570 | </context> | 578 | </context> | ||
571 | 579 | | |||
572 | <!-- Strings --> | 580 | <!-- Strings --> | ||
573 | <!-- r"..." --> | 581 | <!-- r"..." --> | ||
Show All 32 Lines | 612 | <context name="String" attribute="String" lineEndContext="#stay"> | |||
606 | <Detect2Chars attribute="String" context="#pop" char=""" char1="c"/> | 614 | <Detect2Chars attribute="String" context="#pop" char=""" char1="c"/> | ||
607 | <Detect2Chars attribute="String" context="#pop" char=""" char1="w"/> | 615 | <Detect2Chars attribute="String" context="#pop" char=""" char1="w"/> | ||
608 | <Detect2Chars attribute="String" context="#pop" char=""" char1="d"/> | 616 | <Detect2Chars attribute="String" context="#pop" char=""" char1="d"/> | ||
609 | <DetectChar attribute="String" context="#pop" char="""/> | 617 | <DetectChar attribute="String" context="#pop" char="""/> | ||
610 | <Detect2Chars attribute="EscapeSequence" context="UnicodeShort" char="\" char1="u"/> | 618 | <Detect2Chars attribute="EscapeSequence" context="UnicodeShort" char="\" char1="u"/> | ||
611 | <Detect2Chars attribute="EscapeSequence" context="UnicodeLong" char="\" char1="U"/> | 619 | <Detect2Chars attribute="EscapeSequence" context="UnicodeLong" char="\" char1="U"/> | ||
612 | <Detect2Chars attribute="EscapeSequence" context="HTMLEntity" char="\" char1="&"/> | 620 | <Detect2Chars attribute="EscapeSequence" context="HTMLEntity" char="\" char1="&"/> | ||
613 | </context> | 621 | </context> | ||
614 | 622 | <!-- q{...} --> | |||
623 | <context name="TokenString" attribute="Normal Text" lineEndContext="#stay"> | ||||
624 | <DetectChar attribute="TokenString" context="#pop" char="}" /> | ||||
625 | <IncludeRules context="normal" /> | ||||
626 | </context> | ||||
615 | <!-- Comments --> | 627 | <!-- Comments --> | ||
616 | <context name="CommentRules" attribute="Normal Text" lineEndContext="#pop"> | 628 | <context name="CommentRules" attribute="Normal Text" lineEndContext="#pop"> | ||
617 | <IncludeRules context="DdocNormal" /> | 629 | <IncludeRules context="DdocNormal" /> | ||
618 | <Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/> | 630 | <Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/> | ||
619 | <Detect2Chars attribute="Comment" context="CommentBlock" char="/" char1="*" beginRegion="CommentBlock"/> | 631 | <Detect2Chars attribute="Comment" context="CommentBlock" char="/" char1="*" beginRegion="CommentBlock"/> | ||
620 | <Detect2Chars attribute="Comment" context="CommentNested" char="/" char1="+" beginRegion="CommentNested"/> | 632 | <Detect2Chars attribute="Comment" context="CommentNested" char="/" char1="+" beginRegion="CommentNested"/> | ||
621 | <!-- This context is only for including rules from. --> | 633 | <!-- This context is only for including rules from. --> | ||
622 | </context> | 634 | </context> | ||
▲ Show 20 Lines • Show All 172 Lines • ▼ Show 20 Line(s) | 761 | <itemDatas> | |||
795 | <itemData name="Float" defStyleNum="dsFloat"/> | 807 | <itemData name="Float" defStyleNum="dsFloat"/> | ||
796 | 808 | | |||
797 | <itemData name="EscapeSequence" defStyleNum="dsSpecialChar"/> | 809 | <itemData name="EscapeSequence" defStyleNum="dsSpecialChar"/> | ||
798 | <itemData name="String" defStyleNum="dsString"/> | 810 | <itemData name="String" defStyleNum="dsString"/> | ||
799 | <itemData name="Char" defStyleNum="dsChar"/> | 811 | <itemData name="Char" defStyleNum="dsChar"/> | ||
800 | <itemData name="RawString" defStyleNum="dsVerbatimString"/> | 812 | <itemData name="RawString" defStyleNum="dsVerbatimString"/> | ||
801 | <itemData name="BQString" defStyleNum="dsSpecialString"/> | 813 | <itemData name="BQString" defStyleNum="dsSpecialString"/> | ||
802 | <itemData name="HexString" defStyleNum="dsSpecialString"/> | 814 | <itemData name="HexString" defStyleNum="dsSpecialString"/> | ||
815 | <itemData name="TokenString" defStyleNum="dsSpecialString"/> | ||||
803 | 816 | | |||
804 | <!-- Ddoc specific --> | 817 | <!-- Ddoc specific --> | ||
805 | <itemData name="Macros" defStyleNum="dsOthers" color="#bf5fbf" selColor="#ffffff" bold="1" italic="0" /> | 818 | <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" /> | 819 | <itemData name="Macro Text" defStyleNum="dsNormal" color="#bf7fff" selColor="#ffffff" bold="0" italic="0" /> | ||
807 | <itemData name="Ddoc" defStyleNum="dsComment" color="#7f7fff" /> | 820 | <itemData name="Ddoc" defStyleNum="dsComment" color="#7f7fff" /> | ||
808 | <itemData name="DdocSection" defStyleNum="dsKeyword" color="#7f7fff" bold="1" /> | 821 | <itemData name="DdocSection" defStyleNum="dsKeyword" color="#7f7fff" bold="1" /> | ||
809 | <itemData name="DdocCode" defStyleNum="dsNormal" italic="1" /> | 822 | <itemData name="DdocCode" defStyleNum="dsNormal" italic="1" /> | ||
810 | </itemDatas> | 823 | </itemDatas> | ||
Show All 9 Lines |