- While legal in C++, the enum and its values are only visible within
the scope it was declared in, making it invisible to the rest of
the program.
char * type;
};
+typedef enum {
+ PTOK_NONE = 0,
+ PTOK_TAG,
+ PTOK_ARRAY,
+ PTOK_STRING,
+ PTOK_COND
+} ptokType;
+
/** \ingroup header
*/
typedef struct sprintfToken_s * sprintfToken;
struct sprintfToken_s {
- enum {
- PTOK_NONE = 0,
- PTOK_TAG,
- PTOK_ARRAY,
- PTOK_STRING,
- PTOK_COND
- } type;
+ ptokType type;
union {
struct sprintfTag_s tag; /*!< PTOK_TAG */
struct {