X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=token_t.h;h=eb42775456ad55d9f043cf9e7b025c7ce01597a8;hb=3d1fea359377282d17186c6d61d8ca1f20b87c69;hp=9f3d73e0401c08edd514c72df2c8735b91fdd9c2;hpb=32d427603859262f2e0fd49651b91fb925c779a4;p=cparser diff --git a/token_t.h b/token_t.h index 9f3d73e..eb42775 100644 --- a/token_t.h +++ b/token_t.h @@ -29,9 +29,7 @@ typedef enum token_kind_tag_t { T_NULL = 0, #define T(mode,x,str,val) x val, -#define TS(x,str,val) x val, #include "tokens.inc" -#undef TS #undef T T_LAST_TOKEN } token_kind_tag_t; @@ -46,8 +44,8 @@ typedef enum pp_token_kind_tag_t { } pp_token_kind_tag_t; typedef unsigned short pp_token_kind_t; -typedef struct source_position_t source_position_t; -struct source_position_t { +typedef struct position_t position_t; +struct position_t { const char *input_name; unsigned lineno; unsigned colno : 31; @@ -57,7 +55,7 @@ struct source_position_t { extern symbol_t *token_symbols[]; /* position used for "builtin" declarations/types */ -extern const source_position_t builtin_source_position; +extern const position_t builtin_position; typedef struct token_base_t token_base_t; typedef struct literal_t literal_t; @@ -65,9 +63,9 @@ 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; + token_kind_t kind; + position_t pos; + symbol_t *symbol; }; struct literal_t {