Advise for syntax highlighting
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Fri Mar 27 03:34:57 PDT 2015
I'm currently updating the TextMate D bundle for D2. I have a couple of
questions for how to highlighting some specific code or how other
editors/IDE's highlight them.
* "this" in constructor
this () {}
In TextMate functions/methods are highlighted, should this be
highlighted as a keyword or as a method?
* "this" in copy constructor
this (this) {}
The "this" parameter, should that be highlighted as a keyword or as a
parameter?
* The "__ctfe" variable
if (__ctfe) {}
How should this highlighted? I see a couple of alternatives:
- not at all
- as a keyword
- as a special recognized built-in symbol, similar to __LINE__
- as a special recognized library symbol. For example, in the C bundle
many of functions in the standard library are specially recognized and
highlighted differently. This might not apply here since it's not a
library symbol
* __traits identifiers
__traits(allMembers, Foo);
In this case "allMembers". Basically the same question and alternatives
as for the "__ctfe" variable.
* Predefined version identifiers
version (OSX) {}
Again, same a question and alternatives as for the "__ctfe" variable.
* Extern identifiers
extern (C)
Again, same a question and alternatives as for the "__ctfe" variable.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list