Changeset 506 in dev for trunk/ab5.0/abdev/BasicCompiler_Common
- Timestamp:
- Apr 28, 2008, 7:52:46 PM (17 years ago)
- Location:
- trunk/ab5.0/abdev/BasicCompiler_Common
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/include/NamespaceSupporter.h
r505 r506 97 97 return false; 98 98 } 99 100 static bool CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection );101 99 }; -
trunk/ab5.0/abdev/BasicCompiler_Common/src/NamespaceSupporter.cpp
r465 r506 14 14 return true; 15 15 } 16 17 bool NamespaceSupporter::CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection )18 {19 int i, i2;20 char temporary[1024];21 22 bool isSuccessful = true;23 24 // 名前空間管理25 NamespaceScopes namespaceScopes;26 27 for(i=0;;i++){28 if(source[i]=='\0') break;29 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 );39 40 if( !namespaceScopesCollection.IsExist( namespaceScopes ) ){41 namespaceScopesCollection.push_back( namespaceScopes );42 }43 44 continue;45 }46 else if( source[i] == 1 && source[i+1] == ESC_ENDNAMESPACE ){47 if( namespaceScopes.size() <= 0 ){48 compiler.errorMessenger.Output( 12, "End Namespace", i );49 isSuccessful = false;50 }51 else{52 namespaceScopes.pop_back();53 }54 55 i += 2;56 continue;57 }58 }59 60 if( namespaceScopes.size() > 0 ){61 compiler.errorMessenger.Output( 63, NULL, cp );62 isSuccessful = false;63 }64 65 return isSuccessful;66 }
Note:
See TracChangeset
for help on using the changeset viewer.