1 /// Author: Aziz Köksal
2 /// License: GPL3
3 /// $(Maturity very high)
4 module dil.lexer.IDsEnum;
5 
6 import dil.lexer.IDsList;
7 
8 version(DDoc)
9   enum IDK : ushort; /// Enumeration of predefined identifier kinds.
10 else
11 mixin(
12   // Enumerates predefined identifiers.
13   "enum IDK : ushort {
14     None, /// Uninitialized or defined at run-time.\n"
15     ~ {
16     char[] members;
17     foreach (pair; keywordIDs)
18       members ~= pair[0] ~ ",\n";
19     foreach (pair; specialIDs)
20       members ~= pair[0] ~ ",\n";
21     foreach (pair; predefinedIDs)
22       members ~= pair[0] ~ ",\n";
23     return members;
24   }() ~
25   "}"
26 );