aboutsummaryrefslogtreecommitdiffhomepage
path: root/lex.h
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-09-10 20:15:56 +0200
committerlemon <lsof@mailbox.org>2025-09-10 22:41:39 +0200
commit5bcdee9f0702e4f54897166250898475f0d26ca3 (patch)
treeabc9087456157ab2b182b25a3ab65c3dfcf4433b /lex.h
parent3fc3b2680581a59b3d08244a190d5d7bdcf80e45 (diff)
lex: stringify args in function macros
Diffstat (limited to 'lex.h')
-rw-r--r--lex.h5
1 files changed, 3 insertions, 2 deletions
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, /* <hdr> (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
*/