From: cuz Date: Sun, 29 May 2005 11:57:53 +0000 (+0000) Subject: Allow empty and comment lines in structs X-Git-Tag: V2.12.0~322 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=71126c8200a6a78cfb534ab176ffa94272310fdc;p=cc65 Allow empty and comment lines in structs git-svn-id: svn://svn.cc65.org/cc65/trunk@3519 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/struct.c b/src/ca65/struct.c index 0ac676842..ae1b00a38 100644 --- a/src/ca65/struct.c +++ b/src/ca65/struct.c @@ -120,9 +120,16 @@ static long DoStructInternal (long Offs, unsigned Type) long MemberSize; SymTable* Struct; + SymEntry* Sym; + + /* Allow empty and comment lines */ + if (Tok == TOK_SEP) { + NextTok (); + continue; + } /* The format is "[identifier] storage-allocator [, multiplicator]" */ - SymEntry* Sym = 0; + Sym = 0; if (Tok == TOK_IDENT) { /* We have an identifier, generate a symbol */ Sym = SymFind (CurrentScope, SVal, SYM_ALLOC_NEW);