From 5bcdee9f0702e4f54897166250898475f0d26ca3 Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 10 Sep 2025 20:15:56 +0200 Subject: lex: stringify args in function macros --- lex.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lex.h') diff --git a/lex.h b/lex.h index 3197cc8..3315d6b 100644 --- a/lex.h +++ b/lex.h @@ -17,7 +17,8 @@ enum toktag { /* single-character tokens' tag value is the character itself */ TKSTRLIT, TKPPHDRH, /* (for #include) */ TKPPHDRQ, /* "hdr" (for #include) */ - TKPPMACARG, /* macro param in repl list */ + TKPPMACARG, /* macro param, in repl list */ + TKPPMACSTR, /* stringify macro param, in repl list */ TKEQU = '@', /* == */ TKNEQ, /* != */ TKLTE, /* <= */ @@ -66,7 +67,7 @@ struct token { * when litlit : s points to start of token within file buffer (normal case) * len == span.sl.len (number literal appears literally in source code) * otherwise s is heap allocated buffer of len bytes - * for macro arg: + * for macro arg/stringify: * s is like keyword/ident * argidx is index in macro param list */ -- cgit v1.2.3