-typedef struct {
- int type;
- union {
- symbol_t *symbol;
- long long intvalue;
- long double floatvalue;
- string_t string;
- wide_string_t wide_string;
- } v;
- type_t *datatype;
- 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);