[Issue 8727] __traits(is_reserved_word, "") ?
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 12 14:24:24 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8727
--- Comment #8 from bearophile_hugs at eml.cc 2012-10-12 14:24:14 PDT ---
(In reply to comment #7)
> bool isReservedWord(in string s)
> {
> //Obtained from lexer.c, and sorted
> string[] reservedWords =
> [
> "__FILE__", "__LINE__", "__argTypes", "__gshared", "__overloadset",
...
The problem with putting a list of words like this in Phobos is that if a new
keyword is added, this function breaks. So it's better for this function to be
built inside __traits() and to use the list of keywords used by the compiler
itself.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list