diff options
| author | Michael Matz <matz@suse.de> | 2016-08-25 16:40:50 +0200 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2016-12-15 17:47:11 +0100 |
| commit | dd57a348664d0fac46a0f4c822f70c80bbf97774 (patch) | |
| tree | 6925b44de13fdeed66eca1bce75fa6c618ef9da8 /tcc.h | |
| parent | e7ef087598d74e3329a7f0b24af8430faf639606 (diff) | |
| download | tinycc-dd57a348664d0fac46a0f4c822f70c80bbf97774.tar.gz tinycc-dd57a348664d0fac46a0f4c822f70c80bbf97774.tar.bz2 | |
tccasm: Don't ignore # in preprocessor directives
Our preprocessor throws away # line-comments in asm mode.
It did so also inside preprocessor directives, thereby
removing stringification. Parse defines in non-asm mode (but
retain '.' as identifier character inside macro definitions).
Diffstat (limited to 'tcc.h')
| -rw-r--r-- | tcc.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1175,10 +1175,16 @@ ST_DATA TokenSym **table_ident; #define PARSE_FLAG_ACCEPT_STRAYS 0x0020 /* next() returns '\\' token */ #define PARSE_FLAG_TOK_STR 0x0040 /* return parsed strings instead of TOK_PPSTR */ +/* isidnum_table flags: */ +#define IS_SPC 1 +#define IS_ID 2 +#define IS_NUM 4 + ST_FUNC TokenSym *tok_alloc(const char *str, int len); ST_FUNC const char *get_tok_str(int v, CValue *cv); ST_FUNC void begin_macro(TokenString *str, int alloc); ST_FUNC void end_macro(void); +ST_FUNC void set_idnum(int c, int val); ST_FUNC void save_parse_state(ParseState *s); ST_FUNC void restore_parse_state(ParseState *s); ST_INLN void tok_str_new(TokenString *s); |
