Changeset 106 in dev for BasicCompiler_Common/VariableOpe.cpp
- Timestamp:
- May 4, 2007, 5:04:50 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.