]> git.sur5r.net Git - cc65/commitdiff
Allow empty and comment lines in structs
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 29 May 2005 11:57:53 +0000 (11:57 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 29 May 2005 11:57:53 +0000 (11:57 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3519 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65/struct.c

index 0ac676842563d75f2c7f15bd1e567c125522dff3..ae1b00a38bca78b10aee36c6b1e0b82838ab7037 100644 (file)
@@ -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);