Colorer syntax file for D
A Colorer syntax definition file for the D programming language
This is a syntax definition file for the syntax highlighting and text parsing library, Colorer. Colorer provides very flexible and organized rules to define syntax and structure, using regular expressions and XML. This library is available as a plugin for FAR (File and Archive manager), Eclipse and Midnight Commander.
An example screenshot of the "Hello World" program from digitalmars.com in FAR, with the outliner:
This syntax definition should support all 1.x language features. It is being updated "once-in-a-while".
- Static constructors are displayed as "static thisthis" in the outliner.
- No 2.x string literal syntax support.
First, unpack your HRC .jar file (colorer\hrc\common.jar). Any program that supports the ZIP file format should do.
Add the following to colorer.hrc or proto.hrc (whichever you have), between C++ and ASM:
<prototype name="d" group="main" description="D"> <location link="base/d.hrc"/> <filename>/\.(d|di)$/i</filename> <firstline>/module/</firstline> <firstline>/import/</firstline> </prototype>
Place d.hrc from above to your colorer\hrc\base\ folder.