Changeset 381 in dev for trunk/abdev/BasicCompiler_Common
- Timestamp:
- Dec 19, 2007, 3:31:03 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/Compile.cpp
r372 r381 49 49 } 50 50 token[i] = source[pos]; 51 } 52 } 53 void GetCustomToken( char *token, const char *source, int &pos, char delimitation, bool isEscapeSequence ) 54 { 55 for( int i=0; ; i++, pos++ ){ 56 if( isEscapeSequence ) 57 { 58 if( source[pos] == 1 && source[pos+1] == delimitation ) 59 { 60 token[i] = 0; 61 pos++; 62 break; 63 } 64 } 65 else 66 { 67 if( source[pos] == delimitation ) 68 { 69 token[i] = 0; 70 break; 71 } 72 } 73 74 token[i] = source[pos]; 75 76 if( source[pos] == '\0' ) 77 { 78 break; 79 } 51 80 } 52 81 } -
trunk/abdev/BasicCompiler_Common/Intermediate_Step2.cpp
r372 r381 451 451 ComNum=COM_FOR; 452 452 } 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 } 455 471 ComNum=COM_FOREACH; 456 472 } -
trunk/abdev/BasicCompiler_Common/common.h
r350 r381 377 377 void GetIdentifierToken( char *token, const char *source, int &pos ); 378 378 void GetCommandToken( char *token, const char *source, int &pos ); 379 void GetCustomToken( char *token, const char *source, int &pos, char delimitation, bool isEscapeSequence ); 379 380 void SplitGenericClassInstance( const char *fullName, char *className, Jenga::Common::Strings &typeParameters ); 380 381 int JumpStatement(const char *source, int &pos);
Note:
See TracChangeset
for help on using the changeset viewer.