-typedef struct {
- int type;
- symbol_t *symbol; /**< contains identifier. Contains number suffix for numbers */
- string_t literal; /**< string value/literal value */
- source_position_t source_position;
-} token_t;
+typedef struct token_base_t token_base_t;
+typedef struct literal_t literal_t;
+typedef struct macro_parameter_t macro_parameter_t;
+typedef union token_t token_t;
+
+struct token_base_t {
+ token_kind_t kind;
+ source_position_t source_position;
+ symbol_t *symbol;
+};
+
+struct literal_t {
+ token_base_t base;
+ string_t string;
+};
+
+struct macro_parameter_t {
+ token_base_t base;
+ pp_definition_t *def;
+};
+
+union token_t {
+ unsigned kind;
+ token_base_t base;
+ literal_t literal;
+ macro_parameter_t macro_parameter;
+};
+
+char const *get_string_encoding_prefix(string_encoding_t);