Changeset 465 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/NumOpe_GetType.cpp
- Timestamp:
- Mar 24, 2008, 8:05:20 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/NumOpe_GetType.cpp
r461 r465 61 61 if(!type){ 62 62 extern int cp; 63 SetError(300,NULL,cp);63 compiler.errorMessenger.Output(300,NULL,cp); 64 64 } 65 65 … … 86 86 if(IsRealNumberType(type[sp-2])||IsRealNumberType(type[sp-1])){ 87 87 //いずれかの項が実数のとき 88 SetError(45,temporary,cp);88 compiler.errorMessenger.Output(45,temporary,cp); 89 89 return 0; 90 90 } … … 92 92 //As以外の演算子に型名が指定されていないかをチェック 93 93 if((type[sp-2]&FLAG_CAST)||(type[sp-1]&FLAG_CAST)){ 94 SetError(48,temporary,cp);94 compiler.errorMessenger.Output(48,temporary,cp); 95 95 return 0; 96 96 } … … 100 100 if(IsRealNumberType(type[sp-1])){ 101 101 //実数のとき 102 SetError(45,temporary,cp);102 compiler.errorMessenger.Output(45,temporary,cp); 103 103 return 0; 104 104 } … … 106 106 //As以外の演算子に型名が指定されていないかをチェック 107 107 if(type[sp-1]&FLAG_CAST){ 108 SetError(48,temporary,cp);108 compiler.errorMessenger.Output(48,temporary,cp); 109 109 return 0; 110 110 } … … 125 125 //As以外の演算子に型名が指定されていないかをチェック 126 126 if((type[sp-2]&FLAG_CAST)||(type[sp-1]&FLAG_CAST)){ 127 SetError(48,temporary,cp);127 compiler.errorMessenger.Output(48,temporary,cp); 128 128 return 0; 129 129 } … … 143 143 //As以外の演算子に型名が指定されていないかをチェック 144 144 if((type[sp-2]&FLAG_CAST)||(type[sp-1]&FLAG_CAST)){ 145 SetError(48,temporary,cp);145 compiler.errorMessenger.Output(48,temporary,cp); 146 146 return 0; 147 147 } … … 154 154 if(IsRealNumberType(type[sp-2])||IsRealNumberType(type[sp-1])){ 155 155 //いずれかの項が実数のとき 156 SetError(45,temporary,cp);156 compiler.errorMessenger.Output(45,temporary,cp); 157 157 return 0; 158 158 } … … 160 160 //As以外の演算子に型名が指定されていないかをチェック 161 161 if((type[sp-2]&FLAG_CAST)||(type[sp-1]&FLAG_CAST)){ 162 SetError(48,temporary,cp);162 compiler.errorMessenger.Output(48,temporary,cp); 163 163 return 0; 164 164 } … … 168 168 if((type[sp-1]&FLAG_CAST)==0){ 169 169 //型名が指定されていないときはエラー 170 SetError(47,NULL,cp);170 compiler.errorMessenger.Output(47,NULL,cp); 171 171 return 0; 172 172 } … … 176 176 if(type[sp-1]&FLAG_CAST){ 177 177 //型名が指定されていないときはエラー 178 SetError(47,NULL,cp);178 compiler.errorMessenger.Output(47,NULL,cp); 179 179 return 0; 180 180 } … … 184 184 //As以外の演算子に型名が指定されていないかをチェック 185 185 if(type[sp-1]&FLAG_CAST){ 186 SetError(48,temporary,cp);186 compiler.errorMessenger.Output(48,temporary,cp); 187 187 return 0; 188 188 } … … 279 279 if( !compiler.StringToType( TypeName, resultType ) ) 280 280 { 281 SetError(3,TypeName,cp);281 compiler.errorMessenger.Output(3,TypeName,cp); 282 282 return false; 283 283 } … … 285 285 if( !resultType.IsObject() ) 286 286 { 287 SetError(121,NULL,cp);287 compiler.errorMessenger.Output(121,NULL,cp); 288 288 return false; 289 289 } … … 326 326 { 327 327 if( !GetReturnTypeOfIndexerGetterProc( classType, resultType ) ){ 328 SetError(1,NULL,cp);328 compiler.errorMessenger.Output(1,NULL,cp); 329 329 return false; 330 330 } … … 509 509 //閉じカッコ")"に続く文字がNULLでないとき 510 510 if(termFull[i2+1+i4+1]!='\0'){ 511 SetError(42,NULL,cp);511 compiler.errorMessenger.Output(42,NULL,cp); 512 512 } 513 513 … … 541 541 542 542 //閉じカッコ")"に続く文字がNULLでないときはエラーにする 543 if(termFull[i2+1+i4+1]!='\0') SetError(42,NULL,cp);543 if(termFull[i2+1+i4+1]!='\0') compiler.errorMessenger.Output(42,NULL,cp); 544 544 545 545 //マクロ関数の場合 … … 571 571 if( classType.IsObject() ){ 572 572 if( !GetReturnTypeOfIndexerGetterProc( classType, resultType ) ){ 573 SetError(1,NULL,cp);573 compiler.errorMessenger.Output(1,NULL,cp); 574 574 return false; 575 575 } … … 649 649 650 650 if(expression[0]=='\0'){ 651 SetError(1,NULL,cp);651 compiler.errorMessenger.Output(1,NULL,cp); 652 652 return false; 653 653 } … … 765 765 } 766 766 else{ 767 SetError(3, term, cp );767 compiler.errorMessenger.Output(3, term, cp ); 768 768 goto error; 769 769 } … … 861 861 } 862 862 else{ 863 SetError(1,NULL,0);863 compiler.errorMessenger.Output(1,NULL,0); 864 864 goto error; 865 865 } … … 876 876 877 877 if(GetSubHash(VarName,0)){ 878 SetError();878 compiler.errorMessenger.OutputFatalError(); 879 879 Type tempType; 880 880 GetReturnTypeOfPropertyMethod(term,NULL,tempType); … … 894 894 //該当する識別子が見当たらないときはエラー扱いにする 895 895 bError=1; 896 SetError(3,term,cp);896 compiler.errorMessenger.Output(3,term,cp); 897 897 type_stack[sp]=DEF_DOUBLE; 898 898 } … … 984 984 if( PTR_LEVEL( type_stack[sp-1] ) <= 0 ){ 985 985 //ポインタ型ではないとき 986 SetError( 3, NULL, cp );986 compiler.errorMessenger.Output( 3, NULL, cp ); 987 987 goto error; 988 988 } … … 996 996 997 997 if(sp!=1){ 998 SetError(1,NULL,cp);998 compiler.errorMessenger.Output(1,NULL,cp); 999 999 goto error; 1000 1000 }
Note:
See TracChangeset
for help on using the changeset viewer.