Changeset 78 in dev for BasicCompiler_Common/VariableOpe.cpp
- Timestamp:
- Mar 25, 2007, 2:47:49 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/VariableOpe.cpp
r76 r78 228 228 //////////////////// 229 229 int i; 230 i= pobj_DBTypeDef->check(TypeName);230 i=House::typeDefs.GetIndex(TypeName); 231 231 if(i!=-1){ 232 return GetTypeFixed(pobj_DBTypeDef->ppobj_TypeDef[i]->lpszBaseName,lpNum); 232 *lpNum = House::typeDefs[i].GetBaseType().GetIndex(); 233 return House::typeDefs[i].GetBaseType().GetBasicType(); 233 234 } 234 235 … … 251 252 return -1; 252 253 } 253 void GetOriginalTypeName(char *buffer){ 254 /* 255 TODO: 消す(TypeDef関連の変更) 256 void GetOriginalTypeName_Old(char *buffer){ 254 257 // TypeDefされた型に対して、オリジナルの型の名前に変更する 255 258 … … 257 260 if(buffer[1]==1&&(buffer[2]==ESC_FUNCTION||buffer[2]==ESC_SUB)) return; 258 261 259 GetOriginalTypeName (buffer+1);262 GetOriginalTypeName_Old(buffer+1); 260 263 return; 261 264 } 262 265 263 266 int i; 264 i= pobj_DBTypeDef->check(buffer);267 i=House::typeDefs.GetIndex(buffer); 265 268 if(i!=-1){ 266 lstrcpy(buffer, pobj_DBTypeDef->ppobj_TypeDef[i]->lpszBaseName);267 GetOriginalTypeName (buffer);268 } 269 } 269 lstrcpy(buffer,House::typeDefs[i].GetBaseName().c_str()); 270 GetOriginalTypeName_Old(buffer); 271 } 272 }*/ 270 273 BOOL GetTypeName(int type,LONG_PTR lpIndex,char *name){ 271 274 if(PTR_LEVEL(type)){ … … 309 312 if(lpIndex==-1) lstrcpy(name,"VoidPtr"); 310 313 else{ 311 extern ProcPointer **ppProcPointer; 312 if( ppProcPointer[lpIndex]->ReturnType().IsNull() ) 314 if( House::procPointers[lpIndex]->ReturnType().IsNull() ) 313 315 lstrcpy(name,"*Sub"); 314 316 else lstrcpy(name,"*Function"); … … 988 990 temporary[i2]=buffer[i]; 989 991 } 992 if(temporary[0]=='*'&& 993 temporary[1]==1&& 994 (temporary[2]==ESC_FUNCTION||temporary[2]==ESC_SUB)){ 995 if(buffer[i]!='('){ 996 SetError(10,temporary,cp); 997 return false; 998 } 999 i3=GetStringInPare(temporary+3,buffer+i); 1000 i+=i3; 1001 i2+=i3; 1002 1003 if(temporary[2]==ESC_FUNCTION&&buffer[i]==1&&buffer[i+1]==ESC_AS){ 1004 temporary[i2++]=buffer[i++]; 1005 temporary[i2++]=buffer[i++]; 1006 for(;;i++,i2++){ 1007 if(!IsVariableChar(buffer[i])){ 1008 temporary[i2]=0; 1009 break; 1010 } 1011 temporary[i2]=buffer[i]; 1012 } 1013 } 1014 } 1015 990 1016 if( !Type::StringToType( temporary, type ) ){ 991 1017 SetError(3,temporary,cp); 992 1018 type.SetBasicType( DEF_LONG ); 993 }994 995 if( type.IsProcPtr() ){996 if(temporary[0]=='*'&&997 temporary[1]==1&&998 (temporary[2]==ESC_FUNCTION||temporary[2]==ESC_SUB)){999 if(buffer[i]!='('){1000 SetError(10,temporary,cp);1001 return false;1002 }1003 i3=GetStringInPare(temporary+3,buffer+i);1004 i+=i3;1005 i2+=i3;1006 1007 if(temporary[2]==ESC_FUNCTION&&buffer[i]==1&&buffer[i+1]==ESC_AS){1008 temporary[i2++]=buffer[i++];1009 temporary[i2++]=buffer[i++];1010 for(;;i++,i2++){1011 if(!IsVariableChar(buffer[i])){1012 temporary[i2]=0;1013 break;1014 }1015 temporary[i2]=buffer[i];1016 }1017 }1018 }1019 else{1020 //TypeDefをする前のベース型を取得1021 GetOriginalTypeName(temporary);1022 }1023 1024 if(temporary[3]!='('){1025 SetError(10,temporary,cp);1026 return false;1027 }1028 1029 //関数ポインタ1030 type.SetIndex( AddProcPtrInfo(temporary+3,temporary[2], cp) );1031 1019 } 1032 1020
Note:
See TracChangeset
for help on using the changeset viewer.