Changeset 185 in dev for trunk/abdev/BasicCompiler_Common/src/ProcedureImpl.cpp
- Timestamp:
- Jun 25, 2007, 4:22:29 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/src/ProcedureImpl.cpp
r184 r185 21 21 //パラメータ 22 22 if(sourceOfParams[i]!='('){ 23 throw SmoothieException(1,NULL,nowLine);23 SmoothieException::Throw(1,NULL,nowLine); 24 24 return 0; 25 25 } … … 28 28 //クラスのメンバ関数の場合のみ、デストラクタにパラメータがある場合にエラーをだす 29 29 if(this->GetName()[0]=='~'){ 30 throw SmoothieException(114,NULL,nowLine);30 SmoothieException::Throw(114,NULL,nowLine); 31 31 i=JumpStringInPare(sourceOfParams,i); 32 32 } … … 77 77 if(sw){ 78 78 //配列パラメータ 79 if( isRef == false ) throw SmoothieException(29,NULL,nowLine);79 if( isRef == false ) SmoothieException::Throw(29,NULL,nowLine); 80 80 isArray = true; 81 81 … … 132 132 133 133 if( type.IsNull() ){ 134 throw SmoothieException(3,temporary,nowLine);134 SmoothieException::Throw(3,temporary,nowLine); 135 135 type.SetBasicType( DEF_PTR_VOID ); 136 136 } … … 145 145 else{ 146 146 type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) ); 147 throw SmoothieException(-103,temporary,nowLine);147 SmoothieException::Throw(-103,temporary,nowLine); 148 148 } 149 149 … … 162 162 else if(sourceOfParams[i]==')') continue; 163 163 else{ 164 throw SmoothieException(1,NULL,nowLine);164 SmoothieException::Throw(1,NULL,nowLine); 165 165 break; 166 166 } … … 215 215 if(sw){ 216 216 //配列パラメータ 217 if( isRef == false ) throw SmoothieException(29,NULL,nowLine);217 if( isRef == false ) SmoothieException::Throw(29,NULL,nowLine); 218 218 isArray = true; 219 219 … … 260 260 261 261 if( type.IsNull() ){ 262 throw SmoothieException(3,temporary,nowLine);262 SmoothieException::Throw(3,temporary,nowLine); 263 263 type.SetBasicType( DEF_PTR_VOID ); 264 264 } … … 266 266 else{ 267 267 type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) ); 268 throw SmoothieException(-103,temporary,nowLine);268 SmoothieException::Throw(-103,temporary,nowLine); 269 269 } 270 270 … … 283 283 else if(sourceOfParams[i]==')') continue; 284 284 else{ 285 throw SmoothieException(1,NULL,nowLine);285 SmoothieException::Throw(1,NULL,nowLine); 286 286 break; 287 287 } … … 297 297 if( !this->IsFunction() ){ 298 298 // Sub/Macroの場合 299 throw SmoothieException(38,this->GetName(),nowLine);299 SmoothieException::Throw(38,this->GetName(),nowLine); 300 300 } 301 301 … … 304 304 this->GetName()[0]=='~'){ 305 305 //クラスのコンストラクタ、デストラクタがFunction定義の場合はエラーをだす 306 throw SmoothieException(115,NULL,nowLine);306 SmoothieException::Throw(115,NULL,nowLine); 307 307 } 308 308 } … … 327 327 } 328 328 Type::StringToType( temporary, this->returnType ); 329 if( this->returnType.IsNull() ) throw SmoothieException(3,temporary,nowLine);329 if( this->returnType.IsNull() ) SmoothieException::Throw(3,temporary,nowLine); 330 330 331 331 sw_as=1; … … 335 335 336 336 if(!sw_as){ 337 throw SmoothieException(-104,this->GetName().c_str(),nowLine);337 SmoothieException::Throw(-104,this->GetName().c_str(),nowLine); 338 338 339 339 this->returnType.SetBasicType( DEF_DOUBLE ); … … 412 412 //パラメータ 413 413 if(sourceOfParams[i]!='('){ 414 throw SmoothieException(1,NULL,nowLine);414 SmoothieException::Throw(1,NULL,nowLine); 415 415 return 0; 416 416 } … … 462 462 if(sw){ 463 463 //配列パラメータ 464 if( isRef == false ) throw SmoothieException(29,NULL,nowLine);464 if( isRef == false ) SmoothieException::Throw(29,NULL,nowLine); 465 465 isArray = true; 466 466 … … 508 508 509 509 if( type.IsNull() ){ 510 throw SmoothieException(3,temporary,nowLine);510 SmoothieException::Throw(3,temporary,nowLine); 511 511 type.SetBasicType( DEF_PTR_VOID ); 512 512 } … … 514 514 else{ 515 515 type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) ); 516 throw SmoothieException(-103,temporary,nowLine);516 SmoothieException::Throw(-103,temporary,nowLine); 517 517 } 518 518 … … 531 531 else if(sourceOfParams[i]==')') continue; 532 532 else{ 533 throw SmoothieException(1,NULL,nowLine);533 SmoothieException::Throw(1,NULL,nowLine); 534 534 break; 535 535 } … … 560 560 } 561 561 Type::StringToType( temporary, this->returnType ); 562 if( this->returnType.IsNull() ) throw SmoothieException(3,temporary,nowLine);562 if( this->returnType.IsNull() ) SmoothieException::Throw(3,temporary,nowLine); 563 563 564 564 sw_as=1; … … 585 585 //パラメータ 586 586 if(sourceOfParams[i]!='('){ 587 throw SmoothieException(1,NULL,nowLine);587 SmoothieException::Throw(1,NULL,nowLine); 588 588 return 0; 589 589 } … … 634 634 if(sw){ 635 635 //配列パラメータ 636 if( isRef == false ) throw SmoothieException(29,NULL,nowLine);636 if( isRef == false ) SmoothieException::Throw(29,NULL,nowLine); 637 637 isArray = true; 638 638 … … 679 679 680 680 if( type.IsNull() ){ 681 throw SmoothieException(3,temporary,nowLine);681 SmoothieException::Throw(3,temporary,nowLine); 682 682 type.SetBasicType( DEF_PTR_VOID ); 683 683 } … … 685 685 else{ 686 686 type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) ); 687 throw SmoothieException(-103,temporary,nowLine);687 SmoothieException::Throw(-103,temporary,nowLine); 688 688 } 689 689 … … 702 702 else if(sourceOfParams[i]==')') continue; 703 703 else{ 704 throw SmoothieException(1,NULL,nowLine);704 SmoothieException::Throw(1,NULL,nowLine); 705 705 break; 706 706 } … … 731 731 } 732 732 Type::StringToType( temporary, this->returnType ); 733 if( this->returnType.IsNull() ) throw SmoothieException(3,temporary,nowLine);733 if( this->returnType.IsNull() ) SmoothieException::Throw(3,temporary,nowLine); 734 734 735 735 sw_as=1; … … 749 749 if( this->ReturnType().IsNull() ){ 750 750 // 戻り値がない 751 throw SmoothieException(26,this->GetName(),nowLine);751 SmoothieException::Throw(26,this->GetName(),nowLine); 752 752 } 753 753 } … … 755 755 if( !this->ReturnType().IsNull() ){ 756 756 // Sub定義なのに、戻り値がある 757 throw SmoothieException(38,this->GetName(),nowLine);757 SmoothieException::Throw(38,this->GetName(),nowLine); 758 758 } 759 759 }
Note:
See TracChangeset
for help on using the changeset viewer.