Token is an int ?
"David Genest" <[email protected]> Sat, 17 Mar 2007 12:50:58 -0400
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Is there a reason why the Type member of the Token struct
(/src/Synopsis/Token.hh) is an opaque int instead of the name of the
enum?
I am using visual studio to compile the core synopsis library, and
this environment is able to display enum values when debugging, which
helps alot when stepping through the lib. I have modified the
corresponding sources and everything works like expected.
So, instead of having:
struct Token
{
typedef int Type;
enum
{
Identifier = 258, //.< The first 256 are representing character literals.
Constant,
CharConst,
...
}
};
I have changed it to:
struct Token
{
enum Type
{
...
}
};
And changed the appropriate places that now expect an enum.
The modification does not influence character literals, but for other
token types, the debugger displays nicely what the current token is.
David.