Changeset 415 in dev for trunk/abdev/BasicCompiler_Common/NumOpe_GetType.cpp
- Timestamp:
- Mar 6, 2008, 11:19:38 PM (17 years ago)
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.