Changeset 415 in dev for trunk/abdev/BasicCompiler_Common
- Timestamp:
- Mar 6, 2008, 11:19:38 PM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/NumOpe_GetType.cpp
r412 r415 298 298 } 299 299 300 bool GetMemberTermType( const Type &leftType, const Type &baseType, Type &resultType, const char *termFull, const char *termLeft, const char *member )300 bool GetMemberTermType( const Type &leftType, const Type &baseType, Type &resultType, const char *termFull, const char *termLeft, const char *member, bool *pIsVariable ) 301 301 { 302 302 //////////////////////////////// … … 325 325 if( GetMemberType( leftType, member, resultType, 0, false ) ){ 326 326 // メンバが見つかったとき 327 328 if( pIsVariable ) 329 { 330 *pIsVariable = true; 331 } 332 327 333 return true; 328 334 } … … 357 363 } 358 364 359 bool GetTermType( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, bool *pIsClassName )365 bool GetTermType( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, bool *pIsClassName, bool *pIsVariable ) 360 366 { 361 367 char parameter[VN_SIZE]; … … 415 421 } 416 422 417 return GetMemberTermType( leftType, baseType, resultType, termFull, termLeft, member );423 return GetMemberTermType( leftType, baseType, resultType, termFull, termLeft, member, pIsVariable ); 418 424 } 419 425 … … 551 557 isLiteral = false; 552 558 559 if( pIsVariable ) 560 { 561 // 変数である 562 *pIsVariable = true; 563 } 564 553 565 return true; 554 566 } … … 572 584 573 585 return false; 586 } 587 588 bool GetTermType( const char *term, Type &resultType ) 589 { 590 bool isLiteral; 591 return GetTermType( term, Type(), resultType, isLiteral ); 592 } 593 594 bool GetTermTypeOnlyVariable( const char *term, Type &resultType ) 595 { 596 bool isLiteral, isVariable = false; 597 bool result = GetTermType( term, Type(), resultType, isLiteral, NULL, &isVariable ); 598 return ( result && isVariable ); 574 599 } 575 600 -
trunk/abdev/BasicCompiler_Common/common.h
r400 r415 350 350 int AutoBigCast(int BaseType,int CalcType); 351 351 BOOL CheckCalcType(int idCalc,int *type,int sp); 352 bool GetTermType( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, bool *pIsClassName = NULL ); 352 bool GetTermType( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, bool *pIsClassName = NULL, bool *pIsVariable = NULL ); 353 bool GetTermType( const char *term, Type &resultType ); 354 bool GetTermTypeOnlyVariable( const char *term, Type &resultType ); 353 355 bool NumOpe_GetType( const char *expression, const Type &baseType, Type &resultType, bool *pIsLiteralCalculation = NULL ); 354 356 -
trunk/abdev/BasicCompiler_Common/hash.cpp
r350 r415 72 72 //"->"によってオブジェクトを指定する通常のメンバ関数呼び出し 73 73 Type type; 74 if( GetVarType(ObjName,type,0) ){ 75 pobj_c = &type.GetClass(); 74 if( GetTermType(ObjName,type) ) 75 { 76 if( type.IsObject() ) 77 { 78 pobj_c = &type.GetClass(); 79 } 76 80 } 77 else{ 81 82 if( !pobj_c ) 83 { 78 84 pobj_c=compiler.GetObjectModule().meta.GetClasses().Find(ObjName); 79 85 if( pobj_c ){
Note:
See TracChangeset
for help on using the changeset viewer.