Changeset 106 in dev for BasicCompiler_Common
- Timestamp:
- May 4, 2007, 5:04:50 PM (18 years ago)
- Location:
- BasicCompiler_Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Class.cpp
r102 r106 91 91 92 92 while(pobj_DBClass->Iterator_HasNext()){ 93 CClass *pobj_c; 94 pobj_c=pobj_DBClass->Iterator_GetNext(); 93 CClass &objClass = *pobj_DBClass->Iterator_GetNext(); 94 95 // 名前空間をセット 96 Smoothie::Lexical::liveingNamespaceScopes = objClass.GetNamespaceScopes(); 95 97 96 98 int i=0; 97 foreach( CMember *member, pobj_c->staticMembers ){99 foreach( CMember *member, objClass.staticMembers ){ 98 100 char temporary[VN_SIZE]; 99 sprintf(temporary,"%s.%s", pobj_c->name,member->name);101 sprintf(temporary,"%s.%s",objClass.name,member->name); 100 102 dim( 101 103 temporary, … … 112 114 } 113 115 } 116 117 Smoothie::Lexical::liveingNamespaceScopes.clear(); 114 118 115 119 cp=back_cp; -
BasicCompiler_Common/VariableOpe.cpp
r103 r106 249 249 } 250 250 251 /*TODO: 消す 251 252 bool FormatUseProcReturnObject( const char *term, char *procName, char *parameter, CClass::RefType &refType, char *member ){ 252 253 int p1 = 0, p2 = 0; … … 294 295 295 296 return true; 296 } 297 }*/ 297 298 298 299 BOOL GetVarFormatString(char *buffer,char *array,char *array2,char *NestMember,CClass::RefType &refType){ … … 632 633 bool GetVarType( const char *nameBuffer, Type &resultType, bool isErrorEnabled){ 633 634 int i; 634 char variable[VN_SIZE] ,member[VN_SIZE],VarName[VN_SIZE],array[VN_SIZE],lpPtrOffset[VN_SIZE];635 char variable[VN_SIZE]; 635 636 636 637 if(nameBuffer[0]=='.'){ … … 640 641 else lstrcpy(variable,nameBuffer); 641 642 642 643 // 名前空間を分離 644 char namespaceStr[VN_SIZE]="", simpleName[VN_SIZE]; 645 Smoothie::Meta::namespaceScopesCollection.SplitNamespace( variable, namespaceStr, simpleName ); 646 647 // 先頭オブジェクトまたはクラス名と入れ子メンバに分割 643 648 CClass::RefType refType; 644 if( FormatUseProcReturnObject( variable, VarName, array, refType, member ) ){ 645 // 戻り値オブジェクトのメンバを直接参照しているとき 646 //例: func().member 647 648 void *pProc; 649 int idProc=GetProc(VarName,(void **)&pProc); 650 651 if(idProc){ 652 Type type; 653 if( !CallProc( idProc, pProc, VarName, array,type, false) ){ 654 return false; 655 } 656 657 return GetMemberType( type.GetClass() ,member,resultType,1,isErrorEnabled); 658 } 659 } 660 661 662 663 lstrcpy(VarName,variable); 664 GetVarFormatString(VarName,array,lpPtrOffset,member,refType); 649 char member[VN_SIZE],array[VN_SIZE],lpPtrOffset[VN_SIZE]; 650 GetVarFormatString(simpleName,array,lpPtrOffset,member,refType); 651 652 // 名前空間を分離していた場合は結合 653 char VarName[VN_SIZE]; 654 if( namespaceStr[0] ){ 655 sprintf( VarName, "%s.%s", namespaceStr, simpleName ); 656 } 657 else{ 658 lstrcpy( VarName, simpleName ); 659 } 665 660 666 661 const Variable *pVar = NULL; -
BasicCompiler_Common/VariableOpe.h
r97 r106 15 15 BOOL GetTypeName(int type,LONG_PTR lpIndex,char *name); 16 16 void GetWithName(char *buffer); 17 bool FormatUseProcReturnObject( const char *term, char *procName, char *parameter, CClass::RefType &refType, char *member );18 17 BOOL GetVarFormatString(char *buffer,char *array,char *array2,char *NestMember, CClass::RefType &refType ); 19 18 void GetArrayElement( const char *buffer,char *variable,char *array_element);
Note:
See TracChangeset
for help on using the changeset viewer.