Changeset 99 in dev for BasicCompiler_Common/Intermediate_Step1.cpp
- Timestamp:
- Apr 19, 2007, 3:09:55 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Intermediate_Step1.cpp
r96 r99 320 320 char *temporary,temp2[VN_SIZE]; 321 321 322 bool isBeforeCharDelimitation = false; 322 323 temporary=(char *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,lstrlen(buffer)*2); 323 324 for(i=0,i2=0,IsStr=0;;i++,i2++){ … … 327 328 buffer[i+1]=ESC_PSMEM; 328 329 } 330 331 if( buffer[i] && IsCommandDelimitation( buffer[i] ) ){ 332 isBeforeCharDelimitation = true; 333 334 temporary[i2]=buffer[i]; 335 continue; 336 } 337 329 338 if(IsVariableChar(buffer[i])&&IsStr==0){ 339 330 340 i3=i2; 331 341 for(;;i++,i2++){ … … 336 346 temporary[i2]=buffer[i]; 337 347 } 348 349 bool isAfterCharBlank = false; 350 if( IsBlank( buffer[i] ) ){ 351 isAfterCharBlank = true; 352 } 353 338 354 if(lstrcmpi(temporary+i3,"End")==0) i6=1; 339 355 else if(lstrcmpi(temporary+i3,"Exit")==0) i6=2; … … 389 405 if(lstrcmpi(temp2,"Macro")==0) sw1=1; 390 406 break; 407 case 'n': 408 case 'N': 409 if(lstrcmpi(temp2,"Namespace")==0) sw1=1; 410 break; 391 411 case 's': 392 412 case 'S': … … 642 662 temporary[i2]=ESC_ENDMACRO; 643 663 } 664 else if(lstrcmpi(temporary+i3,"EndNamespace")==0){ 665 i2=i3; 666 temporary[i2++]=1; 667 temporary[i2]=ESC_ENDNAMESPACE; 668 } 644 669 else if(lstrcmpi(temporary+i3,"EndClass")==0){ 645 670 i2=i3; … … 757 782 case 'n': 758 783 case 'N': 759 if(lstrcmpi(temporary+i3,"New")==0){ 784 if(isBeforeCharDelimitation 785 && lstrcmpi(temporary+i3,"Namespace")==0 786 && isAfterCharBlank ){ 787 i2=i3; 788 temporary[i2++]=1; 789 temporary[i2]=ESC_NAMESPACE; 790 } 791 else if(lstrcmpi(temporary+i3,"New")==0){ 760 792 i2=i3; 761 793 temporary[i2++]=1; … … 868 900 continue; 869 901 } 902 903 if( !IsBlank( buffer[i] ) ){ 904 isBeforeCharDelimitation = false; 905 } 906 870 907 temporary[i2]=buffer[i]; 871 908 if(buffer[i]=='\0') break;
Note:
See TracChangeset
for help on using the changeset viewer.