Changeset 814 in dev for branches/egtra/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp
- Timestamp:
- Mar 19, 2011, 1:29:12 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/egtra/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp
r803 r814 15 15 void LexicalAnalyzer::CollectClassesForNameOnly( const char *source, Classes &classes ) 16 16 { 17 int i , i2;17 int i2; 18 18 char temporary[VN_SIZE]; 19 19 … … 25 25 compiler.GetNamespaceSupporter().ClearImportedNamespaces(); 26 26 27 for(i =0;;i++){27 for(int i=0;;i++){ 28 28 if(source[i]=='\0') break; 29 29 30 30 if( source[i] == 1 && source[i+1] == ESC_NAMESPACE ){ 31 for(i+=2,i2=0;;i2++,i++){ 32 if( IsCommandDelimitation( source[i] ) ){ 33 temporary[i2]=0; 34 break; 35 } 36 temporary[i2]=source[i]; 37 } 38 namespaceScopes.push_back( temporary ); 31 i+=2; 32 char const* p = &source[i]; 33 while (!IsCommandDelimitation(source[i])) 34 { 35 ++i; 36 } 37 namespaceScopes.push_back(std::string(p, &source[i])); 39 38 40 39 continue; … … 52 51 } 53 52 else if( source[i] == 1 && source[i+1] == ESC_IMPORTS ){ 54 for(i+=2,i2=0;;i2++,i++){55 if( IsCommandDelimitation( source[i] ) ){56 temporary[i2]=0;57 break;58 }59 temporary[i2]=source[i];60 }61 if ( !compiler.GetNamespaceSupporter().ImportsNamespace( temporary ))62 { 63 compiler.errorMessenger.Output(64, temporary,i);53 i+=2; 54 char const* p = &source[i]; 55 while (!IsCommandDelimitation(source[i])) 56 { 57 ++i; 58 } 59 std::string s(p, &source[i]); 60 if (!compiler.GetNamespaceSupporter().ImportsNamespace(s)) 61 { 62 compiler.errorMessenger.Output(64, s.c_str(), i); 64 63 } 65 64 … … 1518 1517 else 1519 1518 { 1520 for( int i=0; i<pInterface->GetDynamicMethods().size(); i++ )1519 for( std::size_t i=0; i<pInterface->GetDynamicMethods().size(); i++ ) 1521 1520 { 1522 1521 if( pInterface->GetDynamicMethods()[i]->IsAbstract() != pExpandedInterface->GetDynamicMethods()[i]->IsAbstract() )
Note:
See TracChangeset
for help on using the changeset viewer.