Generates the token type identifier for the given symbol.
There are two special cases:
If symbol is "", then the token identifier will be 0
If symbol is "\0", then the token identifier will be the maximum
valid token type identifier
In all cases this template will alias itself to a constant of type IdType.
This template will fail at compile time if symbol is not one of
the staticTokens, dynamicTokens, or possibleDefaultTokens.
templatetok(stringsymbol)
{
aliastok = TokenId!(IdType, staticTokens, dynamicTokens,
possibleDefaultTokens, symbol);
}
// num and plus are of type ubyte.IdTypeplus = tok!"+";
IdTypenum = tok!"numberLiteral";
Generates the token type identifier for the given symbol.
There are two special cases:
In all cases this template will alias itself to a constant of type IdType. This template will fail at compile time if symbol is not one of the staticTokens, dynamicTokens, or possibleDefaultTokens.