Changeset 38 in dev for BasicCompiler_Common
- Timestamp:
- Jan 22, 2007, 11:38:19 PM (18 years ago)
- Location:
- BasicCompiler_Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/NumOpe_GetType.cpp
r35 r38 409 409 } 410 410 411 412 //インデクサ(getアクセサ) 413 char VarName[VN_SIZE],ArrayElements[VN_SIZE]; 414 GetArrayElement(values[i],VarName,ArrayElements); 415 if(ArrayElements[0]){ 416 CClass *pobj_c; 417 i2=GetVarType(VarName,(LONG_PTR *)&pobj_c,0); 418 if(i2==DEF_OBJECT){ 419 TYPEINFO RetTypeInfo; 420 if( !GetReturnTypeOfIndexerGetterProc(pobj_c,RetTypeInfo) ){ 421 SetError(1,NULL,cp); 422 goto error; 423 } 424 type[sp]=RetTypeInfo.type; 425 index_stack[sp]=RetTypeInfo.u.lpIndex; 426 bLiteralCalculation=0; 427 428 sp++; 429 break; 430 } 431 } 432 433 411 434 i2=GetVarType(values[i],&index_stack[sp],0); 412 435 if(i2!=-1){ … … 472 495 473 496 //配列要素を排除 474 char VarName[VN_SIZE],ArrayElements[VN_SIZE];475 497 GetArrayElement(values[i],VarName,ArrayElements); 476 498 -
BasicCompiler_Common/Subroutine.cpp
r31 r38 222 222 return 1; 223 223 } 224 225 //インデクサ(getter)の戻り値を取得 226 bool GetReturnTypeOfIndexerGetterProc(CClass *pobj_Class,TYPEINFO &RetTypeInfo){ 227 SUBINFO **ppsi; 228 int num; 229 ppsi=pobj_Class->GetOperatorSubInfo(CALC_ARRAY_GET,num); 230 if(num==0){ 231 HeapDefaultFree(ppsi); 232 233 return false; 234 } 235 236 RetTypeInfo.type = ppsi[0]->ReturnType; 237 RetTypeInfo.u.lpIndex = ppsi[0]->u.ReturnIndex; 238 239 HeapDefaultFree(ppsi); 240 241 return true; 242 } 243 224 244 225 245 void AddDeclareData(char *buffer,int NowLine){ -
BasicCompiler_Common/common.h
r34 r38 550 550 int GetReturnTypeOfProc(int idProc,void *pInfo,char *name,char *Parameter,LONG_PTR *plpRetIndex); 551 551 BOOL GetReturnTypeOfPropertyMethod(char *variable,char *RightSide,TYPEINFO *pRetTypeInfo); 552 bool GetReturnTypeOfIndexerGetterProc(CClass *pobj_Class,TYPEINFO &RetTypeInfo); 552 553 BOOL CompareParameter(PARAMETER_INFO *ppi1,int pi_num1,PARAMETER_INFO *ppi2,int pi_num2); 553 554 SUBINFO *AddSubData(char *buffer,int NowLine,BOOL bVirtual,CClass *pobj_c,BOOL bStatic=0);
Note:
See TracChangeset
for help on using the changeset viewer.