From: cuz Date: Wed, 3 Dec 2003 19:51:07 +0000 (+0000) Subject: Syntax change X-Git-Tag: V2.12.0~1094 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=788208d7dc188b75fbb617d4e5ff2c6ecf4e66b5;p=cc65 Syntax change git-svn-id: svn://svn.cc65.org/cc65/trunk@2708 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/struct.c b/src/ca65/struct.c index cb757e0a0..307171d8a 100644 --- a/src/ca65/struct.c +++ b/src/ca65/struct.c @@ -73,9 +73,8 @@ static long Member (long AllocSize) { long Multiplicator; - /* A comma and a multiplicator may follow */ - if (Tok == TOK_COMMA) { - NextTok (); + /* A multiplicator may follow */ + if (Tok != TOK_SEP) { Multiplicator = ConstExpression (); if (Multiplicator <= 0) { Error ("Range error"); @@ -163,7 +162,11 @@ static long DoStructInternal (long Offs, unsigned Type) break; case TOK_RES: - Error ("Not implemented"); + if (Tok == TOK_SEP) { + Error ("Size is missing"); + } else { + MemberSize = Member (1); + } break; case TOK_TAG: @@ -181,6 +184,7 @@ static long DoStructInternal (long Offs, unsigned Type) MemberSize = GetSymVal (SizeSym); } } + MemberSize *= Member (MemberSize); break; case TOK_STRUCT: