Changeset 544 in dev for trunk/ab5.0/abdev
- Timestamp:
- May 4, 2008, 2:06:23 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer.cpp
r542 r544 329 329 char temporary[VN_SIZE]; 330 330 while(1){ 331 extern char *basbuf;332 331 333 332 i++; 334 333 335 if( basbuf[i] == 1 && basbuf[i+1] == ESC_NAMESPACE ){334 if( source[i] == 1 && source[i+1] == ESC_NAMESPACE ){ 336 335 for(i+=2,i2=0;;i2++,i++){ 337 if( IsCommandDelimitation( basbuf[i] ) ){338 temporary[i2]=0; 339 break; 340 } 341 temporary[i2]= basbuf[i];336 if( IsCommandDelimitation( source[i] ) ){ 337 temporary[i2]=0; 338 break; 339 } 340 temporary[i2]=source[i]; 342 341 } 343 342 namespaceScopes.push_back( temporary ); … … 345 344 continue; 346 345 } 347 else if( basbuf[i] == 1 && basbuf[i+1] == ESC_ENDNAMESPACE ){346 else if( source[i] == 1 && source[i+1] == ESC_ENDNAMESPACE ){ 348 347 if( namespaceScopes.size() <= 0 ){ 349 348 compiler.errorMessenger.Output(12, "End Namespace", i ); … … 356 355 continue; 357 356 } 358 else if( basbuf[i] == 1 && basbuf[i+1] == ESC_IMPORTS ){357 else if( source[i] == 1 && source[i+1] == ESC_IMPORTS ){ 359 358 for(i+=2,i2=0;;i2++,i++){ 360 if( IsCommandDelimitation( basbuf[i] ) ){361 temporary[i2]=0; 362 break; 363 } 364 temporary[i2]= basbuf[i];359 if( IsCommandDelimitation( source[i] ) ){ 360 temporary[i2]=0; 361 break; 362 } 363 temporary[i2]=source[i]; 365 364 } 366 365 if( !compiler.GetNamespaceSupporter().ImportsNamespace( temporary ) ) … … 371 370 continue; 372 371 } 373 else if( basbuf[i] == 1 && basbuf[i+1] == ESC_CLEARNAMESPACEIMPORTED ){372 else if( source[i] == 1 && source[i+1] == ESC_CLEARNAMESPACEIMPORTED ){ 374 373 importedNamespaces.clear(); 375 374 continue; 376 375 } 377 376 378 if( basbuf[i]==1 ){377 if( source[i]==1 ){ 379 378 char temporary[VN_SIZE]; 380 if( basbuf[i+1]==ESC_TYPEDEF){379 if(source[i+1]==ESC_TYPEDEF){ 381 380 int i2 = 0; 382 381 for(i+=2;;i2++,i++){ 383 if( basbuf[i]=='\n'){382 if(source[i]=='\n'){ 384 383 temporary[i2]=0; 385 384 break; 386 385 } 387 temporary[i2]= basbuf[i];388 if( basbuf[i]=='\0') break;386 temporary[i2]=source[i]; 387 if(source[i]=='\0') break; 389 388 } 390 389 AddTypeDef( typeDefs, namespaceScopes, temporary, i ); … … 392 391 continue; 393 392 } 394 else if( basbuf[i+1] == ESC_CONST && basbuf[i+2] == 1 && basbuf[i+3] == ESC_ENUM ){393 else if( source[i+1] == ESC_CONST && source[i+2] == 1 && source[i+3] == ESC_ENUM ){ 395 394 int i2 = 0; 396 395 for(i+=4;;i2++,i++){ 397 if(!IsVariableChar( basbuf[i])){396 if(!IsVariableChar(source[i])){ 398 397 temporary[i2]=0; 399 398 break; 400 399 } 401 temporary[i2]= basbuf[i];402 if( basbuf[i]=='\0') break;400 temporary[i2]=source[i]; 401 if(source[i]=='\0') break; 403 402 } 404 403 … … 422 421 //次の行 423 422 for(;;i++){ 424 if(IsCommandDelimitation( basbuf[i])) break;425 } 426 if( basbuf[i]=='\0') break;423 if(IsCommandDelimitation(source[i])) break; 424 } 425 if(source[i]=='\0') break; 427 426 } 428 427 }
Note:
See TracChangeset
for help on using the changeset viewer.