Changeset 575 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp
- Timestamp:
- May 7, 2008, 12:13:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp
r566 r575 78 78 if( typeName[0] == '*' ){ 79 79 if( typeName.size() >= 3 80 && typeName[1] == 1 && ( typeName[2] == ESC_FUNCTION || typeName[2] == ESC_SUB ) ){ 81 //関数ポインタ(*Function) 82 type.SetBasicType( DEF_PTR_PROC ); 83 type.SetIndex( this->GetObjectModule().meta.GetProcPointers().Add( typeName ) ); 84 return true; 80 && typeName[1] == 1 && ( typeName[2] == ESC_FUNCTION || typeName[2] == ESC_SUB ) ) 81 { 82 // 関数ポインタを追加する 83 { 84 DWORD dwProcType = (DWORD)typeName[2]; 85 const std::string ¶mStr = typeName.substr( 3 ); 86 87 Procedure::Kind kind = ( dwProcType == ESC_FUNCTION ) 88 ? Procedure::Function 89 : Procedure::Sub; 90 91 ProcPointer *pProcPointer = new ProcPointer( kind ); 92 93 //buffer[0]は'('となっている 94 extern int cp; 95 ActiveBasic::Compiler::LexicalAnalyzer::SetParamsAndReturnType( pProcPointer, paramStr.c_str(), false, cp ); 96 97 this->GetObjectModule().meta.GetProcPointers().push_back( pProcPointer ); 98 } 99 100 //関数ポインタ(*Function) 101 type.SetBasicType( DEF_PTR_PROC ); 102 type.SetIndex( this->GetObjectModule().meta.GetProcPointers().size() - 1 ); 103 return true; 85 104 } 86 105
Note:
See TracChangeset
for help on using the changeset viewer.