aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2016-08-25 16:40:50 +0200
committerMichael Matz <matz@suse.de>2016-12-15 17:47:11 +0100
commitdd57a348664d0fac46a0f4c822f70c80bbf97774 (patch)
tree6925b44de13fdeed66eca1bce75fa6c618ef9da8 /tcc.h
parente7ef087598d74e3329a7f0b24af8430faf639606 (diff)
downloadtinycc-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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tcc.h b/tcc.h
index e4b5a0e..17c24a2 100644
--- a/tcc.h
+++ b/tcc.h
@@ -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);