Check for macros within .STRUCT/.ENUM.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5076 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include "enum.h"
|
||||
#include "error.h"
|
||||
#include "expr.h"
|
||||
#include "macro.h"
|
||||
#include "nexttok.h"
|
||||
#include "scanner.h"
|
||||
#include "symbol.h"
|
||||
@@ -75,6 +76,7 @@ void DoEnum (void)
|
||||
/* Read until end of struct */
|
||||
while (CurTok.Tok != TOK_ENDENUM && CurTok.Tok != TOK_EOF) {
|
||||
|
||||
Macro* M;
|
||||
SymEntry* Sym;
|
||||
ExprNode* EnumExpr;
|
||||
|
||||
@@ -93,6 +95,12 @@ void DoEnum (void)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* We have an identifier. Is it a macro? */
|
||||
if ((M = FindMacro (&CurTok.SVal)) != 0) {
|
||||
MacExpandStart (M);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* We have an identifier, generate a symbol */
|
||||
Sym = SymFind (CurrentScope, &CurTok.SVal, SYM_ALLOC_NEW);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user