From: uz Date: Wed, 8 Jun 2011 21:09:40 +0000 (+0000) Subject: Add recursive scanning for .define style macros: Replacement using .define is X-Git-Tag: V2.13.3~416 X-Git-Url: https://git.sur5r.net/?p=cc65;a=commitdiff_plain;h=15fc094c7abb5313192339b148bde3d1e5362fc5 Add recursive scanning for .define style macros: Replacement using .define is done not only when the macro is parsed, but also when it is expanded. git-svn-id: svn://svn.cc65.org/cc65/trunk@5045 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/scanner.c b/src/ca65/scanner.c index 61bf3c9f8..a9fd7c2d9 100644 --- a/src/ca65/scanner.c +++ b/src/ca65/scanner.c @@ -796,7 +796,12 @@ void NextRawTok (void) Restart: /* Check if we have tokens from another input source */ if (InputFromStack ()) { - return; + if (CurTok.Tok == TOK_IDENT && IsDefine (&CurTok.SVal)) { + /* This is a define style macro - expand it */ + MacExpandStart (); + goto Restart; + } + return; } Again: