Allow conditional directives within .STRUCT7:UNION and .ENUM
git-svn-id: svn://svn.cc65.org/cc65/trunk@2672 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include "addrsize.h"
|
||||
|
||||
/* ca65 */
|
||||
#include "condasm.h"
|
||||
#include "enum.h"
|
||||
#include "error.h"
|
||||
#include "expr.h"
|
||||
@@ -75,11 +76,19 @@ void DoEnum (void)
|
||||
|
||||
SymEntry* Sym;
|
||||
ExprNode* EnumExpr;
|
||||
|
||||
|
||||
/* Skip empty lines */
|
||||
if (Tok == TOK_SEP) {
|
||||
NextTok ();
|
||||
continue;
|
||||
}
|
||||
|
||||
/* The format is "identifier [ = value ]" */
|
||||
if (Tok != TOK_IDENT) {
|
||||
ErrorSkip ("Identifier expected");
|
||||
/* Maybe it's a conditional? */
|
||||
if (!CheckConditionals ()) {
|
||||
ErrorSkip ("Identifier expected");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user