summaryrefslogtreecommitdiffstats
path: root/kate/data/d.xml
diff options
context:
space:
mode:
Diffstat (limited to 'kate/data/d.xml')
-rw-r--r--kate/data/d.xml900
1 files changed, 685 insertions, 215 deletions
diff --git a/kate/data/d.xml b/kate/data/d.xml
index e53a3174c..2ed3a5f01 100644
--- a/kate/data/d.xml
+++ b/kate/data/d.xml
@@ -5,127 +5,205 @@
D.XML supports syntax highlighting for the D programming language under Kate.
+ Updated 2007-2008 - Diggory Hardy <diggory.hardy@gmail.com> (copyright kate project).
+ Copyright (C) 2007 - Aziz Köksal <aziz.koeksal@gmail.com>
+ Copyright (C) 2007 - Jari-Matti Mäkelä <jmjm@iki.fi>
Copyright (C) 2004 - Simon J Mackenzie <project.katedxml@smackoz.fastmail.fm>
+
This code is released under the LGPL as part of kdelibs/kate.
========================================================================
D is a next generation language written by Walter Bright of Digital Mars fame.
- Digital Mars C, C++ and D Compilers can be obtained from http://www.digitalmars.com/
+ Digital Mars C, C++ and D Compilers can be obtained from http://www.digitalmars.com/d/
========================================================================
- Updates for D.XML can be obtained from http://kate.kde.org/hl/
-
UPDATE HISTORY:-
- 2004.08.15 - D.XML 1.36 - D 0.98 - Current release of D.
- - package, writef(strictly speaking writyef isn't a keyword) - keywords are now supported.
- 2004.??.?? - D.XML 1.35 - D 0.?? - Not sure how this release got posted!
- 2004.05.23 - D.XML 1.34 - D 0.90 - updated.
- 2004.05.19 - D.XML 1.33 - D 0.89 - mixin - keyword is now supported.
- 2004.05.19 - D.XML 1.32 - D 0.77 - pragma, typeof - keywords are now supported.
- 2004.05.19 - D.XML 1.31 - D 0.76 - is - keyword is now supported.
- 2003.09.06 - D.XML 1.30 - D 0.71 - foreach - keyword is now supported.
- 2003.08.18 - D.XML 1.20 - D 0.69 - floats are now supported.
- - embedded underscores in integer and float literals are now supported.
- 2003.08.11 - D.XML 1.10 - updated.
- 2003.07.18 - D.XML 1.00 - First released.
-
- TODO:-
- - Kate string translation cannot handle \" as a literal within a D string. The " will be interpreted as an end of string marker
- when it should be ignored because of the preceding back-slash.
+ 2008.09.22 - d.xml 1.61 - D 1.035/2.019 - Fix for identifiers starting _ and containing numbers.
+ 2008.08.01 - d.xml 1.60 - D 1.033/2.017 - Merging ddoc.xml 1.14 since there is no advantage to having it separate.
+ 2008.07.14 - uncommited - Added properties: .tupleof, .offsetof
+ 2008.06.14 - D.XML 1.53 - D 1.030/2.014 - Added user keyword highlighting.
+ 2008.06.06 - D.XML 1.53 - D 1.030/2.014 - Small fix involving floats starting . in embedded Ddoc.
+ - Added nothrow and pure attributes (D2.0 only).
+ 2008.04.09 - D.XML 1.52 - D 1.028/2.012 - Added properties (especially for arrays).
+ - Added rules for C-Style indenter (thanks vektorboson!)
+ 2008.02.22 - D.XML 1.51 - D 1.027/2.011 - Changed char rule behaviour on line end.
+ - Added support for strings ending with c, w or d (must have got lost at some point).
+ 2008.02.22 - ddoc.xml 1.14 - Fixes/improvements for macros. Highlights first symbol and non-symbols
+ before as errors; matches embedded brackets () properly.
+ 2008.01.09 - D.XML 1.50 - D 1.025/2.009 - Changed pragma, version, deprecated matching to use keyword not DetectString.
+ 2007.12.18 - D.XML 1.49 - D 1.025/2.009 - Fixed some bugs to make the StartingLetter context exit correctly and match identifiers properly.
+ 2007.12.12 - D.XML 1.48 - D 1.024/2.008 - Adjusted existing contexts somewhat (mostly cleanup).
+ - Implemented scope context to hightlight exit in scope(exit) etc.
+ - Adjusted deprecated keyword highlighting.
+ - Changed layout somewhat.
+ - Implemented extra highlighting rules for expressions, attributes, etc.
+ - Changed a lot of colours.
+ 2007.11.15 - D.XML 1.47 - D 1.023/2.007 - Fixed a few unapperent "bugs" found by checkdtd.
+ 2007.11.15 - ddoc.xml 1.13 - Fixed a couple of bugs found by checkdtd and changed the version number format.
+ 2007.11.5 - ddoc.xml 1.12 - Fixed: correct matching of things like /***/ .
+ 2007.10.11 - ddoc.xml 1.11 - Safety catch: check for unterminated code sections (i.e. check for end of
+ ddoc comment even in code sections).
+ - Used DetectIdentifier to (presumably) improve performance.
+ 2007.10.09 - uncommited - ditto - Changed some context="#pop" tags to context="#stay" within the normal
+ context (bugfix for ddoc embedded code highlighting).
+ 2007.10.9 - ddoc.xml 1.10 - Enabled embedded ddoc code highlighting
+ 2007.10.9 - ddoc.xml 1.00 - Initial version
+ 2007.10.08 - D.XML 1.46 - D 1.022/2.005 - Stole Alert and Region Marker highlighting from C++ syntax.
+ - Added support for DDoc highlighting.
+ - Reviewed the float regexps again! Tried to make the best of both versions.
+ 2007.09.17 - D.XML 1.45 - D 1.021/2.004 - Reverted back to old regexps (but fixed hex floats).
+ Can't combine all float regexps into a single RegExpr element using the '|' operator.
+ It creates strange problems (like program lock-ups and wrong matches).
+ - Fix: '=' is allowed in import statements now.
+ - Fix: character literals are matched correctly now.
+ - The #line special token sequence is matched fully now (the filespec string needs special handling).
+ 2007.09.10 - D.XML 1.44 - D 1.021/2.004 - Added __EOF__ to specialtokens.
+ - Replaced float regexps with more accurate ones. Not sure about speed.
+ - Fixed Octal regexp not to match 0_ .
+ 2007.07.24 - D.XML 1.43 - D 1.020/2.003 - Added System to ltypes.
+ - Improved matching of version declarations.
+ - Fixed matching of hexadecimal floats.
+ - Deprecated style is stroked out again.
+ 2007.07.21 - D.XML 1.42 - D 1.018/2.002 - d.xml validates again according to language.xml.
+ - HTML entities are highlighted now.
+ - Numbers before and after the slice operator are not highl. as floats anymore.
+ - Added C++ to ltypes.
+ - Improved matching of module/import declarations.
+ 2007.07.01 - D.XML 1.41 - D 1.017/2.001 - fixed matching of numbers, added deprecated style, minor changes to styles, updated authors line
+ 2007.07.01 - D.XML 1.40 - D 1.017/2.001 - matches now .di extensions, removed phobos-specific printf/writef and added
+ - library defined symbols string, wstring, dstring, size_t, ptrdiff_t, hash_t,
+ - Error, Exception, Object, TypeInfo and ClassInfo
+ 2007.06.30 - D.XML 1.39 - D 1.017 - matching is much faster now, added "lib" to pragma types, added special tokens,
+ - /+ +/ can be nested now, numbers are matched more correctly, character literals don't span multiple lines anymore
+ - escape sequences inside strings and character literals are highlighted,
+ - non-hex characters in hex strings are highlighted with the Error style,
+ - using more default styles instead of custom ones
+ 2007.04.11 - D.XML 1.38 - D 1.011 - ref, macro keywords are now supported, fixed \\ inside a string, updated author
+ 2007.02.12 - D.XML 1.37 - D 1.006 - bool, foreach_reverse, lazy, scope and typeid keywords are now supported, fixed \"
+ - inside a string, fixed ending of wysiwyg strings.
+ 2004.08.15 - D.XML 1.36 - D 0.98 - Current release of D.
+ - package, writef(strictly speaking writef isn't a keyword) - keywords are now supported.
+ 2004.??.?? - D.XML 1.35 - D 0.?? - Not sure how this release got posted!
+ 2004.05.23 - D.XML 1.34 - D 0.90 - updated.
+ 2004.05.19 - D.XML 1.33 - D 0.89 - mixin - keyword is now supported.
+ 2004.05.19 - D.XML 1.32 - D 0.77 - pragma, typeof - keywords are now supported.
+ 2004.05.19 - D.XML 1.31 - D 0.76 - is - keyword is now supported.
+ 2003.09.06 - D.XML 1.30 - D 0.71 - foreach - keyword is now supported.
+ 2003.08.18 - D.XML 1.20 - D 0.69 - floats are now supported.
+ - embedded underscores in integer and float literals are now supported.
+ 2003.08.11 - D.XML 1.10 - updated.
+ 2003.07.18 - D.XML 1.00 - First released.
+
+ TODO:- Deliminated strings and Token strings (D2.0) are not supported.
========================================================================
-->
-<language name="D" section="Sources" extensions="*.d;*.D" mimetype="text/x-dsrc" version="1.36" kateversion="2.2" casesensitive="true" author="Simon J Mackenzie (project.katedxml@smackoz.fastmail.fm)" license="LGPL">
+<language name="D" version="1.61" kateversion="2.5" 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">
<highlighting>
- <list name="keywords">
- <item> abstract </item>
- <item> alias </item>
- <item> align </item>
+ <!-- User-defined keywords (add identifiers you'd like highlighted here) -->
+ <list name="userkeywords">
+ </list>
+ <list name="statements">
<item> asm </item>
- <item> auto </item>
-
<item> body </item>
<item> break </item>
-
<item> case </item>
- <item> cast </item>
<item> catch </item>
- <item> class </item>
- <item> const </item>
<item> continue </item>
-
<item> default </item>
- <item> delegate </item>
- <item> delete </item>
- <item> deprecated </item>
<item> do </item>
-
<item> else </item>
- <item> enum </item>
- <item> export </item>
-
- <item> false </item>
- <item> final </item>
<item> finally </item>
<item> for </item>
<item> foreach </item>
- <item> function </item>
-
+ <item> foreach_reverse </item>
<item> goto </item>
-
<item> if </item>
- <item> in </item>
- <item> inout </item>
- <item> interface </item>
- <item> invariant </item>
- <item> is </item>
-
<item> mixin </item>
+ <item> return </item>
+ <item> switch </item>
+ <item> throw </item>
+ <item> try </item>
+ <item> while </item>
+ <item> with </item>
+
+ <!-- these are statements according to the spec, although I might call them attributes -->
+ <item> synchronized </item>
- <item> new </item>
- <item> null </item>
+ </list>
- <item> out </item>
+ <list name="attributes">
+ <!-- also storage classes -->
+ <item> abstract </item>
+ <item> align </item>
+ <item> auto </item>
+ <item> const </item>
+ <item> export </item>
+ <item> final </item>
+ <item> inout </item>
+ <item> invariant </item>
+ <item> lazy </item>
+ <item> nothrow </item>
<item> override </item>
-
<item> package </item>
<item> private </item>
<item> protected </item>
<item> public </item>
-
- <item> return </item>
-
+ <item> pure </item>
+ <item> ref </item>
<item> static </item>
- <item> struct </item>
+
+ <!-- these may be statements -->
+ <!-- in (more common to use as an expression since in attribute is only ever the default) -->
+ <item> out </item>
+ <item> scope </item>
+ </list>
+
+ <list name="expressions">
+ <!-- primary expressions -->
+ <item> false </item>
+ <item> null </item>
<item> super </item>
- <item> switch </item>
- <item> synchronized </item>
-
- <item> template </item>
<item> this </item>
- <item> throw </item>
<item> true </item>
- <item> try </item>
- <item> typedef </item>
- <item> typeof </item>
-
- <item> union </item>
-
- <item> volatile </item>
-
- <item> while </item>
- <item> with </item>
+ <item> typeid </item>
+
+ <!-- other expressions -->
+ <item> assert </item>
+ <item> cast </item>
+ <item> is </item>
+ <item> new </item>
+ <item> delete </item>
+ <item> in </item> <!-- also an attribute and a statement -->
+
+ <!-- sometimes declarators -->
+ <item> delegate </item>
+ <item> function </item>
</list>
+
<list name="modules">
<item> module </item>
- <item> import </item>
+ <item> import </item> <!-- also an expression -->
</list>
+
+ <list name="declarators">
+ <item> alias </item>
+ <item> enum </item>
+ <item> typedef </item>
+ <item> class </item>
+ <item> interface </item>
+ <item> struct </item>
+ <item> union </item>
+ </list>
+
<list name="types">
+ <item> typeof </item>
+
<item> void </item>
- <item> bit </item>
+ <item> bool </item>
<item> byte </item>
<item> ubyte </item>
<item> short </item>
@@ -149,9 +227,77 @@
<item> wchar </item>
<item> dchar </item>
</list>
- <list name="phobos">
- <item> printf </item>
- <item> writef </item>
+
+ <list name="templates">
+ <item> macro </item> <!-- what's this? just reserved? -->
+ <item> template </item>
+ </list>
+
+ <list name="properties">
+ <item> init </item>
+ <item> sizeof </item>
+ <item> alignof </item>
+ <item> mangleof </item>
+ <item> stringof </item>
+ <item> tupleof </item>
+ <item> offsetof </item>
+ <item> max </item>
+ <item> min </item>
+ <item> infinity </item>
+ <item> nan </item>
+ <item> dig </item>
+ <item> epsilon </item>
+ <item> mant_dig </item>
+ <item> max_10_exp </item>
+ <item> max_exp </item>
+ <item> min_10_exp </item>
+ <item> min_exp </item>
+ <item> re </item>
+ <item> im </item>
+ <item> length </item>
+ <item> ptr </item>
+ <item> dup </item>
+ <item> idup </item>
+ <item> reverse </item>
+ <item> sort </item>
+ <item> keys </item>
+ <item> values </item>
+ <item> rehash </item>
+ </list>
+
+ <list name="libsymbols">
+ <!-- these are only symbols defined in object.d(i) -->
+ <item> size_t </item>
+ <item> ptrdiff_t </item>
+ <item> hash_t </item>
+ <item> Error </item>
+ <item> Exception </item>
+ <item> Object </item>
+ <item> TypeInfo </item>
+ <item> ClassInfo </item>
+ <item> ModuleInfo </item>
+ <item> Interface </item>
+ <item> OffsetTypeInfo </item>
+ <item> TypeInfo_Typedef </item>
+ <item> TypeInfo_Enum </item>
+ <item> TypeInfo_Pointer </item>
+ <item> TypeInfo_Array </item>
+ <item> TypeInfo_StaticArray </item>
+ <item> TypeInfo_AssociativeArray </item>
+ <item> TypeInfo_Function </item>
+ <item> TypeInfo_Delegate </item>
+ <item> TypeInfo_Class </item>
+ <item> TypeInfo_Interface </item>
+ <item> TypeInfo_Struct </item>
+ <item> TypeInfo_Tuple </item>
+
+ <!-- phobos only as of tango 0.99.3 -->
+ <item> string </item>
+ <item> wstring </item>
+ <item> dstring </item>
+ <item> bit </item>
+ <item> TypeInfo_Const </item>
+ <item> TypeInfo_Invariant </item>
</list>
<list name="linkage">
@@ -159,189 +305,513 @@
</list>
<list name="ltypes">
<item> C </item>
+ <!-- <item> C++ </item> --><!-- is handled specially in Linkage rule -->
<item> D </item>
<item> Windows </item>
<item> Pascal </item>
+ <item> System </item>
</list>
- <list name="debug">
- <item> debug </item>
- </list>
- <list name="assert">
- <item> assert </item>
- </list>
-
- <list name="pragma">
- <item> pragma </item>
- </list>
<list name="ptypes">
<item> msg </item>
+ <item> lib </item>
</list>
-
- <list name="version">
- <item> version </item>
+
+ <list name="scope_keywords">
+ <item> exit </item>
+ <item> success </item>
+ <item> failure </item>
</list>
+
<list name="vtypes">
<item> DigitalMars </item>
<item> X86 </item>
- <item> AMD64 </item>
+ <item> X86_64 </item>
<item> Windows </item>
<item> Win32 </item>
<item> Win64 </item>
<item> linux </item>
<item> LittleEndian </item>
<item> BigEndian </item>
- <item> D_InlineAsm </item>
+ <item> D_Coverage </item>
+ <item> D_InlineAsm_X86 </item>
+ <item> unittest </item>
+ <item> D_Version2 </item>
<item> none </item>
+ <item> all </item>
</list>
- <list name="unittest">
+ <list name="specialtokens">
+ <item> __FILE__ </item>
+ <item> __LINE__ </item>
+ <item> __DATE__ </item>
+ <item> __TIME__ </item>
+ <item> __TIMESTAMP__ </item>
+ <item> __VENDOR__ </item>
+ <item> __VERSION__ </item>
+ <item> __EOF__ </item>
+ </list>
+
+ <list name="tests">
+ <item> debug </item>
<item> unittest </item>
</list>
+
+ <list name="pragma">
+ <item> pragma </item>
+ </list>
+ <list name="version">
+ <item> version </item>
+ </list>
+
+ <list name="deprecated">
+ <item> deprecated </item>
+ <item> volatile </item> <!-- has been deprecated -->
+ </list>
+
<contexts>
- <context attribute="Normal Text" lineEndContext="#stay" name="normal">
- <keyword attribute="Keyword" context="#stay" String="keywords"/>
- <keyword attribute="Module" context="ModuleName" String="modules"/>
- <keyword attribute="Type" context="#stay" String="types"/>
- <keyword attribute="Phobos Library" context="#stay" String="phobos"/>
- <keyword attribute="Linkage" context="Linkage" String="linkage"/>
- <keyword attribute="Debug" context="#stay" String="debug"/>
- <keyword attribute="Assert" context="#stay" String="assert"/>
- <keyword attribute="Pragma" context="Pragmas" String="pragma"/>
- <keyword attribute="Version" context="Version" String="version"/>
- <keyword attribute="Unit Test" context="#stay" String="unittest"/>
-
- <Detect2Chars attribute="Wysiwyg" context="Wysiwyg" char="r" char1="&quot;"/>
- <Detect2Chars attribute="Hex" context="Hex" char="x" char1="&quot;"/>
-
- <RegExpr attribute="Normal Text" context="#pop" String="[_a-z][\w]*" insensitive="true"/>
-
- <RegExpr attribute="Pragma" context="#pop" String="\#[ ]*line"/>
-
- <RegExpr attribute="Escape String" context="#pop" String="\\[n|t|&quot;]"/>
- <RegExpr attribute="Escape String" context="#pop" String="(\\r\\n)"/>
- <RegExpr attribute="Escape String" context="#pop" String="\\0[0-7]+"/>
- <RegExpr attribute="Escape String" context="#pop" String="\\u[\d]+" insensitive="true"/>
- <RegExpr attribute="Escape String" context="#pop" String="\\x[\da-fA-F]+"/>
-
- <RegExpr attribute="Binary" context="#pop" String="0b[01]+[_01]*[ ]*\.\.[ ]*0b[01]+[_01]*(UL|LU|U|L)?" insensitive="true"/>
- <RegExpr attribute="Octal" context="#pop" String="0[0-7]+[_0-7]*[ ]*\.\.[ ]*0[0-7]+[_0-7]*(UL|LU|U|L)?" insensitive="true"/>
- <RegExpr attribute="Hex" context="#pop" String="0x[\da-f]+[_\da-f]*[ ]*\.\.[ ]*0x[\da-f]+[_\da-f]*(UL|LU|U|L)?" insensitive="true"/>
- <RegExpr attribute="Integer" context="#pop" String="[\d]+[_\d]*(UL|LU|U|L)?[ ]*\.\.[ ]*[\d]+[_\d]*(UL|LU|U|L)?" insensitive="true"/>
-
- <RegExpr attribute="Float" context="#pop" String="[\d]*[_\d]*\.[_\d]*(e-|e|e\+)?[\d]+[_\d]*(F|L|I|FI|LI|)?" insensitive="true"/>
- <RegExpr attribute="Float" context="#pop" String="[\d]*[_\d]*\.?[_\d]*(e-|e|e\+)[\d]+[_\d]*(F|L|I|FI|LI|)?" insensitive="true"/>
- <RegExpr attribute="Float" context="#pop" String="0x[\da-f]+[_\da-f]*\.[_\da-f]*(p-|p|p\+)?[\da-f]+[_\da-f]*(F|L|I|FI|LI)?" insensitive="true"/>
- <RegExpr attribute="Float" context="#pop" String="0x[\da-f]+[_\da-f]*\.?[_\da-f]*(p-|p|p\+)[\da-f]+[_\da-f]*(F|L|I|FI|LI)?" insensitive="true"/>
-
- <RegExpr attribute="Binary" context="#pop" String="0B[01]+[_01]*(UL|LU|U|L)?" insensitive="true"/>
- <RegExpr attribute="Octal" context="#pop" String="0[0-7]+[_0-7]*(UL|LU|U|L)?" insensitive="true"/>
- <RegExpr attribute="Hex" context="#pop" String="0x[\da-f]+[_\da-f]*(UL|LU|U|L)?" insensitive="true"/>
- <RegExpr attribute="Integer" context="#pop" String="[\d]+[_\d]*(UL|LU|U|L)?" insensitive="true"/>
-
- <DetectChar attribute="Char" context="Char" char="'"/>
- <DetectChar attribute="String" context="String" char="&quot;"/>
- <DetectChar attribute="Wysiwyg" context="Wysiwyg" char="`"/>
+ <context name="normal" attribute="Normal Text" lineEndContext="#stay">
+ <DetectSpaces />
+ <!-- Performance improvement (probably): anything starting with a letter is matched separately -->
+ <RegExpr String="[a-zA-Z_]" attribute="Normal Text" context="StartingLetter" lookAhead="true"/>
+
+ <HlCStringChar attribute="EscapeSequence" context="#stay"/>
+ <Detect2Chars attribute="EscapeSequence" context="UnicodeShort" char="\" char1="u"/>
+ <Detect2Chars attribute="EscapeSequence" context="UnicodeLong" char="\" char1="U"/>
+ <Detect2Chars attribute="EscapeSequence" context="HTMLEntity" char="\" char1="&amp;"/>
+
+ <DetectChar attribute="Char" context="CharLiteral" char="'"/>
+ <DetectChar attribute="String" context="String" char="&quot;"/>
+ <DetectChar attribute="BQString" context="BQString" char="`"/>
+
+ <StringDetect attribute="Region Marker" context="Region Marker" String="//BEGIN" beginRegion="Region1" firstNonSpace="true" />
+ <StringDetect attribute="Region Marker" context="Region Marker" String="//END" endRegion="Region1" firstNonSpace="true" />
+ <IncludeRules context="CommentRules" />
+
+ <!-- Match ... and .. before numbers are matched. -->
+ <!-- Now in symbols keywords section -->
+ <StringDetect attribute="Normal Text" context="#stay" String="..."/>
+ <Detect2Chars attribute="Normal Text" char="." char1="."/>
+
+ <!-- Float starting with a dot -->
+ <RegExpr attribute="Float" context="#stay" String="\.\d[\d_]*([eE][-+]?\d[\d_]*)?[fFL]?i?"/>
+
+ <!-- Try to match various built-in properties -->
+ <DetectChar char="." attribute="Normal Text" context="Properties"/>
+
+ <!-- Look ahead for a digit and switch to NumberLiteral context if found. -->
+ <RegExpr context="NumberLiteral" String="\d" attribute="" lookAhead="true"/>
+
+ <!-- #line Integer [Filespec] -->
+ <StringDetect attribute="Pragma" context="LinePragma" String="#line"/>
+
+ <!-- Rules for the C-style indenter. Currently problems with /// and /++ comments. -->
+ <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="BraceA" />
+ <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="BraceA" />
+ <AnyChar attribute="Symbol" context="#stay" String=":!%&amp;()+,-/.*&lt;=&gt;?[]|~^&#59;"/>
+ </context>
- <Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/>
- <Detect2Chars attribute="Comment" context="CommentBlockA" char="/" char1="*" beginRegion="CommentA"/>
- <Detect2Chars attribute="Comment" context="CommentBlockB" char="/" char1="+" beginRegion="CommentB"/>
-
- <DetectChar attribute="Normal Text" context="#stay" char="{" beginRegion="BraceA" />
- <DetectChar attribute="Normal Text" context="#stay" char="}" endRegion="BraceA" />
- </context>
-
- <context attribute="Module Name" lineEndContext="#stay" name="ModuleName">
- <DetectChar attribute="Normal Text" context="#stay" char=","/>
- <DetectChar attribute="Normal Text" context="#pop" char=";"/>
- <Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/>
- <Detect2Chars attribute="Comment" context="CommentBlockA" char="/" char1="*" beginRegion="CommentA"/>
- <Detect2Chars attribute="Comment" context="CommentBlockB" char="/" char1="+" beginRegion="CommentB"/>
- </context>
-
- <context attribute="Linkage" lineEndContext="#pop" name="Linkage">
- <keyword attribute="Type" context="#pop" String="types"/>
- <DetectChar attribute="Normal Text" context="#stay" char="("/>
- <keyword attribute="Linkage Type" context="#stay" String="ltypes"/>
- <DetectChar attribute="Normal Text" context="#pop" char=")"/>
- <DetectChar attribute="Normal Text" context="#pop" char=";"/>
- </context>
- <context attribute="Version" lineEndContext="#pop" name="Version">
- <DetectChar attribute="Normal Text" context="#pop" char="="/>
- <DetectChar attribute="Normal Text" context="#stay" char="("/>
- <keyword attribute="Version Type" context="#stay" String="vtypes"/>
- <RegExpr attribute="Normal Text" context="#pop" String="\w" insensitive="true"/>
- <DetectChar attribute="Normal Text" context="#pop" char=")"/>
- </context>
- <context attribute="Pragma" lineEndContext="#pop" name="Pragmas">
- <DetectChar attribute="Normal Text" context="#stay" char="("/>
- <keyword attribute="Version Type" context="#stay" String="ptypes"/>
- <keyword attribute="Version Type" context="#stay" String="vtypes"/>
- <RegExpr attribute="Keyword" context="#pop" String="[_a-z][\w]*" insensitive="true"/>
- <DetectChar attribute="Normal Text" context="#pop" char=","/>
- <DetectChar attribute="Normal Text" context="#pop" char=")"/>
- </context>
-
- <context attribute="Wysiwyg" lineEndContext="#stay" name="Wysiwyg">
- <DetectChar attribute="Wysiwyg" context="#pop" char="&quot;"/>
- <DetectChar attribute="Wysiwyg" context="#pop" char="`"/>
- </context>
- <context attribute="Hex" lineEndContext="#stay" name="Hex">
- <DetectChar attribute="Hex" context="#pop" char="&quot;"/>
- </context>
- <context attribute="Char" lineEndContext="#stay" name="Char">
- <Detect2Chars attribute="Char" context="#stay" char="\" char1="'"/>
- <Detect2Chars attribute="Char" context="#stay" char="\" char1="\"/>
+ <context name="StartingLetter" attribute="Normal Text" lineEndContext="#pop">
+ <DetectSpaces />
+ <!-- fall-through should work now that DetectIdentifier is used (without infinite loops) -->
+ <!-- maybe not... got an infinite loop -->
+ <RegExpr String="[^a-zA-Z_]" attribute="Normal Text" context="#pop" lookAhead="true"/>
+
+ <!-- detect whether scope, in, out, etc. are used as attributes or statements (etc.) -->
+ <!-- rules cannot match across newlines unfortunately -->
+ <RegExpr String="in\s*(?=\{)" attribute="Statement" context="#stay" />
+ <RegExpr String="out\s*(?=(\(([a-zA-Z_][\w_]*)?\)\s*)?\{)" attribute="Statement" context="#stay" />
+ <RegExpr String="scope\s*(?=\()" attribute="Statement" context="Scope" />
+ <RegExpr String="import\s*(?=\()" attribute="Expression" context="#stay" />
+ <RegExpr String="function\s*(?=\()" attribute="Declarator" context="#stay" />
+ <RegExpr String="delegate\s*(?=\()" attribute="Declarator" context="#stay" />
+
+ <keyword String="statements" attribute="Statement" context="#stay" />
+ <keyword String="attributes" attribute="Attribute" context="#stay" />
+ <keyword String="expressions" attribute="Expression" context="#stay" />
+ <keyword String="declarators" attribute="Declarator" context="#stay" />
+ <keyword String="templates" attribute="Template" context="#stay" />
+ <keyword String="modules" attribute="Module" context="ModuleName"/>
+ <keyword String="types" attribute="Type" context="#stay" />
+ <keyword String="libsymbols" attribute="LibrarySymbols" context="#stay" />
+ <keyword String="linkage" attribute="Linkage" context="Linkage" />
+ <keyword String="specialtokens" attribute="SpecialTokens" context="#stay" />
+ <keyword String="tests" attribute="Tests" context="#stay" />
+ <!-- These must use keyword not DetectString: DetectString does not check for word-break after string. -->
+ <keyword String="pragma" attribute="Pragma" context="Pragma" />
+ <keyword String="version" attribute="Version" context="Version" />
+ <keyword String="deprecated" attribute="Deprecated" context="#stay" />
+
+ <Detect2Chars attribute="RawString" context="RawString" char="r" char1="&quot;"/>
+ <Detect2Chars attribute="HexString" context="HexString" char="x" char1="&quot;"/>
+
+ <!-- user highlighting: last so as not to interfere with anything else -->
+ <keyword String="userkeywords" attribute="UserKeywords" context="#stay" />
+
+ <DetectIdentifier />
+ </context>
+
+ <context name="Properties" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
+ <keyword String="properties" attribute="Property" context="#pop" />
+ </context>
+ <context name="NumberLiteral" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
+ <!-- Float literals -->
+ <!-- Floats must be matched before Binary|Octal|Hex|DecInteger -->
+ <RegExpr attribute="Float" context="#pop" String="0[xX][\da-fA-F_]*(\.[\da-fA-F_]*)?[pP][-+]?\d[\d_]*[fFL]?i?"/>
+ <!-- Float starting with a dot is matched in main context -->
+ <!-- All floats except integers -->
+ <!-- RegExpr is branched rather than using look aheads for efficiency at the expense of extra length -->
+ <RegExpr attribute="Float" context="#pop" String="\d[_\d]*(\.(?!\.)[_\d]*([eE][-+]?\d[_\d]*)?[fFL]?i?|[eE][-+]?\d[_\d]*[fFL]?i?|[fF]i?|[fFL]?i)"/>
+
+ <!-- Binary|Octal|Hex|DecInteger -->
+ <!-- Common, optional suffix: (L[uU]?|[uU]L?)? -->
+ <RegExpr attribute="Binary" context="#pop" String="0[bB]_*[01][01_]*(L[uU]?|[uU]L?)?"/>
+ <!-- Octal must be matched before DecInteger -->
+ <RegExpr attribute="Octal" context="#pop" String="0[0-7_]+(L[uU]?|[uU]L?)?"/>
+ <RegExpr attribute="Hex" context="#pop" String="0[xX]_*[\da-fA-F][\da-fA-F_]*(L[uU]?|[uU]L?)?"/>
+ <!-- Decimal integers must be matched last -->
+ <RegExpr attribute="Integer" context="#pop" String="\d+[\d_]*(L[uU]?|[uU]L?)?"/>
+ </context>
+
+ <context name="LinePragma" attribute="Pragma" lineEndContext="#pop">
+ <DetectSpaces/>
+ <!-- Match an Integer -->
+ <RegExpr attribute="Integer" context="#stay" String="((0([0-7_]+|[bB]_*[01][01_]*|[xX]_*[\da-fA-F][\da-fA-F_]*))|\d+[\d_]*)(L[uU]?|[uU]L?)?"/>
+ <RegExpr attribute="String" context="#stay" String="&quot;[^&quot;]*&quot;"/>
+ <keyword attribute="SpecialTokens" context="#stay" String="specialtokens"/>
+ <IncludeRules context="CommentRules" />
+ <RegExpr attribute="Error" context="#pop" String=".+"/>
+ </context>
+
+ <!-- \u 4HexDigits -->
+ <context name="UnicodeShort" attribute="EscapeSequence" lineEndContext="#pop">
+ <RegExpr attribute="EscapeSequence" context="#pop" String="[\da-fA-F]{4}"/>
+ </context>
+ <!-- \U 8HexDigits -->
+ <context name="UnicodeLong" attribute="EscapeSequence" lineEndContext="#pop">
+ <RegExpr attribute="EscapeSequence" context="#pop" String="[\da-fA-F]{8}"/>
+ </context>
+ <!-- \& Alpha Alphanumerical+ ; -->
+ <context name="HTMLEntity" attribute="EscapeSequence" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
+ <RegExpr attribute="EscapeSequence" context="#pop" String="[a-zA-Z]\w+;"/>
+ </context>
+
+ <context name="ModuleName" attribute="Module Name" lineEndContext="#stay">
+ <DetectSpaces/>
+ <IncludeRules context="CommentRules" />
+ <RegExpr context="#pop" String="[^\s\w.:,=]" lookAhead="true"/>
+ </context>
+
+ <context name="Linkage" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
+ <DetectSpaces/>
+ <DetectChar attribute="Normal Text" context="Linkage2" char="("/>
+ <IncludeRules context="CommentRules" />
+ </context>
+ <context name="Linkage2" attribute="Normal Text" lineEndContext="#stay">
+ <DetectSpaces/>
+ <StringDetect attribute="Linkage Type" context="#pop#pop" String="C++"/>
+ <keyword attribute="Linkage Type" context="#pop#pop" String="ltypes"/>
+ <IncludeRules context="CommentRules" />
+ <!-- Fall-through rules, highlighting errors: -->
+ <DetectChar char=")" attribute="Normal Text" context="#pop#pop"/>
+ <RegExpr String="[^)\s\n]+" attribute="Error" context="#pop#pop"/>
+ </context>
+
+ <context name="Version" attribute="Normal Text" lineEndContext="#stay">
+ <DetectSpaces/>
+ <DetectChar attribute="Normal Text" context="Version2" char="="/>
+ <DetectChar attribute="Normal Text" context="Version2" char="("/>
+ <IncludeRules context="CommentRules" />
+ <!-- Fall-through rules, highlighting errors: -->
+ <RegExpr String="[^\s\n]+" attribute="Error" context="#pop"/>
+ </context>
+ <context name="Version2" attribute="Normal Text" lineEndContext="#stay">
+ <DetectSpaces/>
+ <keyword attribute="Version Type" context="#pop#pop" String="vtypes"/>
+ <DetectIdentifier attribute="Normal Text" context="#pop#pop"/>
+ <RegExpr attribute="Integer" context="#pop#pop" String="\d+[\d_]*(L[uU]?|[uU]L?)?"/>
+ <IncludeRules context="CommentRules" />
+ <!-- Fall-through rules, highlighting errors: -->
+ <DetectChar char=")" attribute="Normal Text" context="#pop#pop"/>
+ <RegExpr String="[^)\s\n]+" attribute="Error" context="#pop#pop"/>
+ </context>
+
+ <context name="Scope" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
+ <DetectSpaces/>
+ <DetectChar attribute="Normal Text" context="Scope2" char="("/>
+ <IncludeRules context="CommentRules" />
+ </context>
+ <context name="Scope2" attribute="Normal Text" lineEndContext="#stay">
+ <DetectSpaces/>
+ <keyword String="scope_keywords" attribute="Expression" context="#pop#pop"/>
+ <IncludeRules context="CommentRules" />
+ <!-- Fall-through rules, highlighting errors: -->
+ <DetectChar char=")" attribute="Normal Text" context="#pop#pop"/>
+ <RegExpr String="[^)\s\n]+" attribute="Error" context="#pop#pop"/>
+ </context>
+
+ <context name="Pragma" attribute="Pragma" lineEndContext="#stay">
+ <DetectSpaces/>
+ <DetectChar attribute="Normal Text" context="Pragma2" char="("/>
+ <IncludeRules context="CommentRules" />
+ <!-- Fall-through rules, highlighting errors: -->
+ <RegExpr String="[^\s\n]+" attribute="Error" context="#pop"/>
+ </context>
+ <context name="Pragma2" attribute="Pragma" lineEndContext="#stay">
+ <DetectSpaces/>
+ <keyword attribute="Version Type" context="#pop#pop" String="ptypes"/>
+ <DetectIdentifier attribute="Normal Text" context="#pop#pop"/>
+ <IncludeRules context="CommentRules" />
+ <!-- Fall-through rules, highlighting errors: -->
+ <DetectChar char=")" attribute="Normal Text" context="#pop#pop"/>
+ <RegExpr String="[^)\s\n]+" attribute="Error" context="#pop#pop"/>
+ </context>
+
+ <!-- Strings -->
+ <!-- r"..." -->
+ <context name="RawString" attribute="RawString" lineEndContext="#stay">
+ <DetectChar attribute="RawString" context="#pop" char="&quot;"/>
+ </context>
+ <!-- `...` -->
+ <context name="BQString" attribute="BQString" lineEndContext="#stay">
+ <DetectChar attribute="BQString" context="#pop" char="`"/>
+ </context>
+ <!-- x"..." -->
+ <context name="HexString" attribute="HexString" lineEndContext="#stay">
+ <DetectChar attribute="HexString" context="#pop" char="&quot;"/>
+ <RegExpr attribute="Error" context="#stay" String="[^\sa-fA-F\d&quot;]+" />
+ </context>
+ <!-- '...' -->
+ <context name="CharLiteral" attribute="Char" lineEndContext="CharLiteralClosing" fallthrough="true" fallthroughContext="#pop">
+ <!-- Empty '' -->
<DetectChar attribute="Char" context="#pop" char="'"/>
+ <!-- \t \n \r etc. -->
+ <HlCStringChar attribute="EscapeSequence" context="CharLiteralClosing"/>
+ <!-- \u 4HexDigits | \U 8HexDigits | HTMLEntity -->
+ <RegExpr attribute="EscapeSequence" context="CharLiteralClosing" String="\\(u[\da-fA-F]{4}|U[\da-fA-F]{8}|&amp;[a-zA-Z]\w+;)"/>
+ <!-- Invalid escape sequences -->
+ <RegExpr attribute="Error" context="CharLiteralClosing" String="\\."/>
+ <!-- Any character -->
+ <RegExpr attribute="Char" context="CharLiteralClosing" String="."/>
</context>
- <context attribute="String" lineEndContext="#stay" name="String">
+ <!-- Anything other than a closing ' is now be an error -->
+ <context name="CharLiteralClosing" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop">
+ <DetectChar attribute="Char" context="#pop#pop" char="'"/>
+ </context>
+ <!-- "..." -->
+ <context name="String" attribute="String" lineEndContext="#stay">
+ <HlCStringChar attribute="EscapeSequence"/>
+ <Detect2Chars attribute="String" context="#pop" char="&quot;" char1="c"/>
+ <Detect2Chars attribute="String" context="#pop" char="&quot;" char1="w"/>
+ <Detect2Chars attribute="String" context="#pop" char="&quot;" char1="d"/>
<DetectChar attribute="String" context="#pop" char="&quot;"/>
+ <Detect2Chars attribute="EscapeSequence" context="UnicodeShort" char="\" char1="u"/>
+ <Detect2Chars attribute="EscapeSequence" context="UnicodeLong" char="\" char1="U"/>
+ <Detect2Chars attribute="EscapeSequence" context="HTMLEntity" char="\" char1="&amp;"/>
</context>
- <context attribute="Comment" lineEndContext="#pop" name="CommentLine">
+ <!-- Comments -->
+ <context name="CommentRules" attribute="Normal Text" lineEndContext="#pop">
+ <IncludeRules context="DdocNormal" />
+ <Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/>
+ <Detect2Chars attribute="Comment" context="CommentBlock" char="/" char1="*" beginRegion="CommentBlock"/>
+ <Detect2Chars attribute="Comment" context="CommentNested" char="/" char1="+" beginRegion="CommentNested"/>
+ <!-- This context is only for including rules from. -->
+ </context>
+ <context name="Region Marker" attribute="Region Marker" lineEndContext="#pop">
+ </context>
+ <context name="CommentLine" attribute="Comment" lineEndContext="#pop">
+ <DetectSpaces />
+ <IncludeRules context="##Alerts" />
+ </context>
+ <context name="CommentBlock" attribute="Comment" lineEndContext="#stay">
+ <DetectSpaces />
+ <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="CommentBlock"/>
+ <IncludeRules context="##Alerts" />
+ </context>
+ <context name="CommentNested" attribute="Comment" lineEndContext="#stay">
+ <DetectSpaces />
+ <Detect2Chars attribute="Comment" context="CommentNested" char="/" char1="+" beginRegion="CommentNested"/>
+ <Detect2Chars attribute="Comment" context="#pop" char="+" char1="/" endRegion="CommentNested"/>
+ <IncludeRules context="##Alerts" />
+ </context>
+
+
+ <!-- Ddoc contexts -->
+ <context name="DdocNormal" attribute="Normal Text" lineEndContext="#stay">
+ <RegExpr attribute="Comment" context="DdocLine" String="/{3,}"/>
+ <RegExpr attribute="Comment" context="DdocBlock" String="/\*{2,}(?!/)" beginRegion="DdocBlock"/>
+ <RegExpr attribute="Comment" context="DdocNested" String="/\+{2,}(?!/)" beginRegion="DdocNested"/>
+ </context>
+
+ <context name="DdocLine" attribute="Ddoc" lineEndContext="#pop">
+ <DetectSpaces />
+ <DetectIdentifier attribute="Ddoc"/>
+ <Detect2Chars attribute="Macros" context="DdocMacro" char="$" char1="(" />
+ <RegExpr attribute="DdocSection" context="#stay" String="[\w_]+:($|\s)" />
+ <IncludeRules context="##Alerts" />
+ </context>
+
+ <context name="DdocBlock" attribute="Ddoc" lineEndContext="#stay">
+ <DetectSpaces />
+ <DetectIdentifier attribute="Ddoc"/>
+ <RegExpr attribute="Comment" context="#pop" String="\*+/" endRegion="DdocBlock"/>
+ <DetectChar attribute="Comment" context="#stay" char="*" firstNonSpace="true" />
+
+ <Detect2Chars attribute="Macros" context="DdocMacro" char="$" char1="(" />
+ <RegExpr attribute="DdocSection" context="#stay" String="[\w_]+:($|\s)" />
+ <IncludeRules context="##Alerts" />
+
+ <!-- Avoid matching this; do it this way since (^|\s)-* always matches .- and \s-* never
+ matches .- (spaces have already been matched); however -*($|\s) matches just fine.
+ Also can't use \b since - is not a word character. -->
+ <RegExpr attribute="Ddoc" context="#stay" String="[^-]-{3,}" />
+ <RegExpr attribute="Comment" context="DdocBlockCode" String="-{3,}($|\s)" />
+ </context>
+
+ <context name="DdocNested" attribute="Ddoc" lineEndContext="#stay">
+ <DetectSpaces />
+ <DetectIdentifier attribute="Ddoc"/>
+ <!-- Ddoc recognises nested comments/ddoc, but ignores them as far as formatting is concerned. -->
+ <Detect2Chars attribute="Ddoc" context="DdocNested2" char="/" char1="+"/>
+ <RegExpr attribute="Comment" context="#pop" String="\++/" endRegion="DdocNested"/>
+ <DetectChar attribute="Comment" context="#stay" char="+" firstNonSpace="true" />
+
+ <Detect2Chars attribute="Macros" context="DdocMacro" char="$" char1="(" />
+ <RegExpr attribute="DdocSection" context="#stay" String="[\w_]+:($|\s)" />
+ <IncludeRules context="##Alerts" />
+
+ <!-- As above. -->
+ <RegExpr attribute="Ddoc" context="#stay" String="[^-]-{3,}" />
+ <RegExpr attribute="Comment" context="DdocNestedCode" String="-{3,}($|\s)" />
</context>
- <context attribute="Comment" lineEndContext="#stay" name="CommentBlockA">
- <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="CommentA"/>
+
+ <context name="DdocNested2" attribute="Ddoc" lineEndContext="#stay">
+ <DetectSpaces />
+ <DetectIdentifier attribute="Ddoc"/>
+ <!-- Identical to DdocNested except that nested comments don't recieve any formatting -->
+ <RegExpr attribute="Ddoc" context="#pop" String="\++/"/>
+ <!-- The above rules should match before the unwanted rule in DdocNested -->
+ <IncludeRules context="DdocNested" />
</context>
- <context attribute="Comment" lineEndContext="#stay" name="CommentBlockB">
- <Detect2Chars attribute="Comment" context="#pop" char="+" char1="/" endRegion="CommentB"/>
+
+ <!-- When entering a macro: provides highlighting for first symbol (macro name) -->
+ <context name="DdocMacro" attribute="Error" lineEndContext="#stay">
+ <DetectSpaces attribute="Macro Text" /> <!-- avoid showing space as an error -->
+
+ <DetectChar attribute="Macros" context="#pop" char=")" /> <!-- early end of macro -->
+ <IncludeRules context="MacroRules" />
+
+ <!-- first symbol of macro -->
+ <DetectIdentifier attribute="Macros" context="DdocMacro2" />
+ </context>
+ <!-- For rest of macro -->
+ <context name="DdocMacro2" attribute="Macro Text" lineEndContext="#stay">
+ <DetectChar attribute="Macros" context="#pop#pop" char=")" /> <!-- end of macro -->
+ <IncludeRules context="MacroRules" />
+ </context>
+ <!-- For embedded brackets (yeah, extra work to ignore them) -->
+ <context name="DdocMacro3" attribute="Macro Text" lineEndContext="#stay">
+ <DetectChar attribute="Macro Text" context="#pop" char=")" /> <!-- end of embedded brackets -->
+ <IncludeRules context="MacroRules" />
+ </context>
+ <!-- Rules common to all macros -->
+ <context name="MacroRules" attribute="Macro Text" lineEndContext="#stay">
+ <Detect2Chars attribute="Macros" context="DdocMacro" char="$" char1="(" /> <!-- embedded -->
+ <DetectChar attribute="Macro Text" context="DdocMacro3" char="(" /> <!-- extra brackets -->
+
+ <DetectChar attribute="Comment" context="#stay" char="*" firstNonSpace="true" />
+ </context>
+
+ <context name="DdocBlockCode" attribute="DdocCode" lineEndContext="#stay">
+ <DetectSpaces />
+ <!-- See update 1.11 -->
+ <RegExpr attribute="Comment" context="#pop#pop" String="\*+/" endRegion="DdocBlock"/>
+ <DetectChar attribute="Comment" context="#stay" char="*" firstNonSpace="true" />
+ <!-- As above. -->
+ <RegExpr attribute="DdocCode" context="#stay" String="[^-]-{3,}" />
+ <RegExpr attribute="Comment" context="#pop" String="-{3,}($|\s)" />
+ <IncludeRules context="##D" />
+ </context>
+ <context name="DdocNestedCode" attribute="DdocCode" lineEndContext="#stay">
+ <DetectSpaces />
+ <!-- See update 1.11 -->
+ <RegExpr attribute="Comment" context="#pop#pop" String="\++/" endRegion="DdocNested"/>
+ <DetectChar attribute="Comment" context="#stay" char="+" firstNonSpace="true" />
+ <!-- As above. -->
+ <RegExpr attribute="DdocCode" context="#stay" String="[^-]-{3,}" />
+ <RegExpr attribute="Comment" context="#pop" String="-{3,}($|\s)" />
+ <IncludeRules context="##D" />
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal"/>
- <itemData name="Keyword" defStyleNum="dsKeyword" color="#000000" selColor="#ffffff" bold="1" italic="0"/>
- <itemData name="Module" defStyleNum="dsKeyword" color="#0000ff" selColor="#ffffff" bold="0" italic="0"/>
- <itemData name="Module Name" defStyleNum="dsKeyword" color="#0000ff" selColor="#ffffff" bold="1" italic="1"/>
+ <itemData name="Symbol" defStyleNum="dsNormal"/>
+
+ <!-- keywords -->
+ <itemData name="Statement" defStyleNum="dsKeyword"/>
+ <itemData name="Expression" defStyleNum="dsKeyword" color="#000080"/>
+ <itemData name="Declarator" defStyleNum="dsKeyword" color="#800000"/>
+ <itemData name="Template" defStyleNum="dsKeyword" color="#008000"/>
+
+ <itemData name="Attribute" defStyleNum="dsKeyword" color="#800080"/>
+ <itemData name="Deprecated" defStyleNum="dsKeyword" color="#800080" strikeOut="true"/>
+
+ <itemData name="Property" defStyleNum="dsDataType" color="#000080"/>
+
<itemData name="Type" defStyleNum="dsDataType"/>
- <itemData name="Phobos Library" defStyleNum="dsKeyword" color="#000000" selColor="#ffffff" bold="1" italic="1"/>
- <itemData name="Linkage" defStyleNum="dsKeyword" color="#ff0000" selColor="#ffffff" bold="0" italic="0"/>
- <itemData name="Linkage Type" defStyleNum="dsDataType" color="#ff0000" selColor="#ffffff" bold="1" italic="1"/>
- <itemData name="Debug" defStyleNum="dsKeyword" color="#ff00ff" selColor="#ffffff" bold="0" italic="0"/>
- <itemData name="Assert" defStyleNum="dsKeyword" color="#0000ff" selColor="#ffffff" bold="0" italic="0"/>
- <itemData name="Version" defStyleNum="dsKeyword" color="#ff0000" selColor="#ffffff" bold="0" italic="0"/>
- <itemData name="Version Type" defStyleNum="dsDataType" color="#ff0000" selColor="#ffffff" bold="1" italic="1"/>
- <itemData name="Unit Test" defStyleNum="dsKeyword" color="#ff00ff" selColor="#ffffff" bold="1" italic="0"/>
- <itemData name="Pragma" defStyleNum="dsKeyword" color="#00aa00" selColor="#ffffff" bold="1" italic="0"/>
+ <itemData name="LibrarySymbols" defStyleNum="dsDataType" italic="1"/>
+
+ <itemData name="UserKeywords" defStyleNum="dsDataType" italic="1"/>
+
+ <!-- module, import -->
+ <itemData name="Module" defStyleNum="dsKeyword" color="#008000"/>
+ <itemData name="Module Name" defStyleNum="dsNormal" color="#008000"/>
+
+ <!-- pragma, special tokens -->
+ <itemData name="SpecialTokens" defStyleNum="dsNormal" color="#00aa00"/>
+ <itemData name="Pragma" defStyleNum="dsKeyword" color="#00aa00"/>
+
+ <!-- version, extern -->
+ <itemData name="Version" defStyleNum="dsKeyword" color="#808000"/>
+ <itemData name="Version Type" defStyleNum="dsNormal" bold="1"/>
+ <itemData name="Linkage" defStyleNum="dsKeyword" color="#808000"/>
+ <itemData name="Linkage Type" defStyleNum="dsNormal" bold="1"/>
+
+ <itemData name="Tests" defStyleNum="dsKeyword" color="#ff00ff"/>
+ <itemData name="Comment" defStyleNum="dsComment"/>
+ <itemData name="Region Marker" defStyleNum="dsRegionMarker" />
+
+ <itemData name="Error" defStyleNum="dsError"/>
+
+ <!-- literals -->
<itemData name="Integer" defStyleNum="dsDecVal"/>
- <itemData name="Binary" defStyleNum="dsBaseN" color="#00dddd" selColor="#00ffff" bold="0" italic="0"/>
- <itemData name="Octal" defStyleNum="dsBaseN" color="#00aaaa" selColor="#00ffff" bold="0" italic="0"/>
- <itemData name="Hex" defStyleNum="dsBaseN" color="#006666" selColor="#00ffff" bold="0" italic="0"/>
+ <itemData name="Binary" defStyleNum="dsBaseN"/>
+ <itemData name="Octal" defStyleNum="dsBaseN"/>
+ <itemData name="Hex" defStyleNum="dsBaseN"/>
<itemData name="Float" defStyleNum="dsFloat"/>
-
- <itemData name="Escape String" defStyleNum="dsString" color="#00aa00" selColor="#ff0000" bold="0" italic="0"/>
- <itemData name="String" defStyleNum="dsString" color="#00aa00" selColor="#ff0000" bold="0" italic="0"/>
- <itemData name="Char" defStyleNum="dsChar" color="#ff00ff" selColor="#ff00ff" bold="0" italic="0"/>
- <itemData name="Wysiwyg" defStyleNum="dsChar" color="#a100a1" selColor="#ff00ff" bold="0" italic="0"/>
-
- <itemData name="Comment" defStyleNum="dsComment"/>
+
+ <itemData name="EscapeSequence" defStyleNum="dsString" color="#00aa88" selColor="#ff0000"/>
+ <itemData name="String" defStyleNum="dsString"/>
+ <itemData name="Char" defStyleNum="dsChar"/>
+ <itemData name="RawString" defStyleNum="dsString" color="#a100a1" selColor="#ff00ff"/>
+ <itemData name="BQString" defStyleNum="dsString" color="#a100a1" selColor="#ff00ff"/>
+ <itemData name="HexString" defStyleNum="dsString" color="#a10022" selColor="#ff0055"/>
+
+ <!-- Ddoc specific -->
+ <itemData name="Macros" defStyleNum="dsOthers" color="#bf5fbf" selColor="#ffffff" bold="1" italic="0" />
+ <itemData name="Macro Text" defStyleNum="dsNormal" color="#bf7fff" selColor="#ffffff" bold="0" italic="0" />
+ <itemData name="Ddoc" defStyleNum="dsComment" color="#7f7fff" />
+ <itemData name="DdocSection" defStyleNum="dsKeyword" color="#7f7fff" bold="1" />
+ <itemData name="DdocCode" defStyleNum="dsNormal" italic="1" />
</itemDatas>
</highlighting>
<general>
<comments>
- <comment name="singleLine" start="//"/>
- <comment name="multiLine" start="/+" end="+/"/>
+ <comment name="singleLine" start="//"/>
+ <comment name="multiLine" start="/+" end="+/" region="CommentNested"/>
</comments>
<keywords casesensitive="true"/>
</general>