reverted compiler change that didn't work out so well
authorDavid Anderson <dvander@alliedmods.net>
Wed Apr 09 05:59:21 2008 +0000 (2008-04-09)
changeset 1976fd2c6a89845d
parent 1975 213f7f8b8ee3
child 1977 a91419cc4497
reverted compiler change that didn't work out so well
sourcepawn/compiler/sc1.c
     1.1 --- a/sourcepawn/compiler/sc1.c	Tue Apr 08 23:42:17 2008 +0000
     1.2 +++ b/sourcepawn/compiler/sc1.c	Wed Apr 09 05:59:21 2008 +0000
     1.3 @@ -2777,21 +2777,16 @@
     1.4                        constvalue *enumroot,int *errorfound)
     1.5  {
     1.6    cell dsize,totalsize;
     1.7 -  int idx,abortparse,needbrace;
     1.8 +  int idx,abortparse;
     1.9  
    1.10    assert(cur>=0 && cur<numdim);
    1.11    assert(startlit>=0);
    1.12    assert(cur+2<=numdim);/* there must be 2 dimensions or more to do */
    1.13    assert(errorfound!=NULL && *errorfound==FALSE);
    1.14    totalsize=0;
    1.15 -  needbrace=1;
    1.16    needtoken('{');
    1.17    for (idx=0,abortparse=FALSE; !abortparse; idx++) {
    1.18 -    if (matchtoken('}'))
    1.19 -    {
    1.20 -      needbrace=0;
    1.21 -      break;
    1.22 -    }
    1.23 +
    1.24      /* In case the major dimension is zero, we need to store the offset
    1.25       * to the newly detected sub-array into the indirection table; i.e.
    1.26       * this table needs to be expanded and updated.
    1.27 @@ -2821,10 +2816,7 @@
    1.28      if (*errorfound || !matchtoken(','))
    1.29        abortparse=TRUE;
    1.30    } /* for */
    1.31 -  if (needbrace)
    1.32 -  {
    1.33 -    needtoken('}');
    1.34 -  }
    1.35 +  needtoken('}');
    1.36    assert(counteddim!=NULL);
    1.37    if (counteddim[cur]>0) {
    1.38      if (idx<counteddim[cur])