Ignore:
Timestamp:
Dec 19, 2007, 3:31:03 AM (17 years ago)
Author:
dai_9181
Message:

Foreach文のパラメータをInで区切るようにした。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler_Common/Intermediate_Step2.cpp

    r372 r381  
    451451        ComNum=COM_FOR;
    452452    }
    453     else if(lstrcmpi(com,"Foreach")==0){
    454         KillSpaces(Command+i,pam);
     453    else if(lstrcmpi(com,"Foreach")==0)
     454    {
     455        for(i2=0,IsStr=0;;i++,i2++)
     456        {
     457            while(Command[i]==' '||Command[i]=='\t') i++;
     458            if(Command[i]=='\"') IsStr^=1;
     459            if((Command[i-1]==' '||Command[i-1]=='\t')&&(Command[i]=='i'||Command[i]=='I')&&(Command[i+1]=='n'||Command[i+1]=='N')&&(Command[i+2]==' '||Command[i+2]=='\t')&&IsStr==0){
     460                pam[i2++] = 1;
     461                pam[i2] = ESC_IN;
     462                break;
     463            }
     464            pam[i2]=Command[i];
     465            if(Command[i]=='\0') break;
     466        }
     467        if(Command[i])
     468        {
     469            lstrcpy( pam + i2 + 1, Command + i + 3 );
     470        }
    455471        ComNum=COM_FOREACH;
    456472    }
Note: See TracChangeset for help on using the changeset viewer.