Changeset 97 in dev for BasicCompiler_Common/Subroutine.cpp
- Timestamp:
- Apr 16, 2007, 3:52:40 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Subroutine.cpp
r94 r97 83 83 } 84 84 } 85 bool SplitMemberName( const char *desc, char *object, char *member, CClass::RefType &refType ){ 86 int lastIndex = -1; 87 for( int i=0; desc[i]; i++ ){ 88 if( desc[i] == '(' ){ 89 i=JumpStringInPare(desc,i+1); 90 continue; 91 } 92 else if( desc[i] == '[' ){ 93 i=JumpStringInBracket(desc,i+1); 94 continue; 95 } 96 else if(desc[i]=='.'||(desc[i]==1&&desc[i+1]==ESC_PSMEM)){ 97 lastIndex = i; 98 } 99 } 100 if( lastIndex == -1 ){ 101 return false; 102 } 103 104 if(desc[lastIndex]=='.'){ 105 lstrcpy(member,desc+lastIndex+1); 106 refType = CClass::Dot; 107 } 108 else{ 109 lstrcpy(member,desc+lastIndex+2); 110 refType = CClass::Pointer; 111 } 112 113 if( object ){ 114 lstrcpy( object, desc ); 115 object[lastIndex]=0; 116 } 117 118 return true; 119 } 85 120 bool SplitMemberName( const char *desc, char *object, char *member ){ 86 int i; 87 for(i=lstrlen(desc)-1;i>=0;i--){ 88 if(desc[i]=='.'||(desc[i]==1&&desc[i+1]==ESC_PSMEM)) 89 break; 90 } 91 if(i==-1) return false; 92 else{ 93 if(desc[i]=='.') 94 lstrcpy(member,desc+i+1); 95 else 96 lstrcpy(member,desc+i+2); 97 98 if( object ){ 99 lstrcpy( object, desc ); 100 object[i]=0; 101 } 102 } 103 104 return true; 121 CClass::RefType dummyRefType; 122 return SplitMemberName( desc, object, member, dummyRefType ); 105 123 } 106 124 … … 565 583 SubNum++; 566 584 567 568 585 UserProc *pUserProc = new UserProc( temporary, kind, isMacro, isCdecl, isExport ); 569 586 pUserProc->SetParentClass( pobj_c ); … … 580 597 // ※第1パラメータにに指定するデータの例:"( s As String ) As String" 581 598 pUserProc->SetParamsAndReturnType( buffer + i, nowLine, isStatic ); 599 600 #ifdef _DEBUG 601 pUserProc->_paramStr = buffer + i; 602 #endif 582 603 583 604
Note:
See TracChangeset
for help on using the changeset viewer.