Ignore:
Timestamp:
Mar 24, 2008, 8:05:20 PM (16 years ago)
Author:
dai_9181
Message:

Messenger/ErrorMessengerクラスを導入。SetError関数によるエラー生成を廃止した。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/Intermediate_Step1.cpp

    r461 r465  
    130130            if(bracket[PareNum]!=0||PareNum<0){
    131131                //"カッコ \'( )\'"
    132                 SetError(4,STRING_PARENTHESIS,i);
     132                compiler.errorMessenger.Output(4,STRING_PARENTHESIS,i);
    133133                return;
    134134            }
     
    138138            if(bracket[PareNum]!=1||PareNum<0){
    139139                //"カッコ \'( )\'"
    140                 SetError(4,STRING_PARENTHESIS,i);
     140                compiler.errorMessenger.Output(4,STRING_PARENTHESIS,i);
    141141                return;
    142142            }
     
    146146
    147147            //"カッコ \'( )\'"
    148             if(PareNum!=0) SetError(4,STRING_PARENTHESIS,i);
    149 
    150             if(IsStr!=0) SetError(5,NULL,i);
     148            if(PareNum!=0) compiler.errorMessenger.Output(4,STRING_PARENTHESIS,i);
     149
     150            if(IsStr!=0) compiler.errorMessenger.Output(5,NULL,i);
    151151            if(buffer[i]=='\0') break;
    152152            PareNum=0;
     
    161161                //全角スペース
    162162                if(buffer[i]==(char)0x81&&buffer[i+1]==(char)0x40)
    163                     SetError(20,NULL,i);
     163                    compiler.errorMessenger.Output(20,NULL,i);
    164164
    165165                //その他の全角文字
    166                 else SetError(8,NULL,i);
     166                else compiler.errorMessenger.Output(8,NULL,i);
    167167                sw=1;
    168168            }
     
    259259                while(basbuf[i2]==' '||basbuf[i2]=='\t') i2++;
    260260                if(basbuf[i2]!='\"'){
    261                     SetError(1,NULL,i2);
     261                    compiler.errorMessenger.Output(1,NULL,i2);
    262262                    return;
    263263                }
     
    317317                while(basbuf[i2]==' '||basbuf[i2]=='\t') i2++;
    318318                if(basbuf[i2]!='\"'){
    319                     SetError(1,NULL,i2);
     319                    compiler.errorMessenger.Output(1,NULL,i2);
    320320                    return;
    321321                }
     
    10211021            while(buffer[i]==' '||buffer[i]=='\t') i++;
    10221022            if(buffer[i]!='('){
    1023                 SetError(1,NULL,i);
     1023                compiler.errorMessenger.Output(1,NULL,i);
    10241024                return;
    10251025            }
     
    10471047            while(buffer[i]==' '||buffer[i]=='\t') i++;
    10481048            if(buffer[i]!='='){
    1049                 SetError(1,NULL,i);
     1049                compiler.errorMessenger.Output(1,NULL,i);
    10501050                break;
    10511051            }
     
    12431243                        if(FuncNum!=0){
    12441244                            if(FuncType==ESC_FUNCTION)
    1245                                 SetError(54,"End Function",FuncPtr);
     1245                                compiler.errorMessenger.Output(54,"End Function",FuncPtr);
    12461246                            else if(FuncType==ESC_SUB)
    1247                                 SetError(54,"End Sub",FuncPtr);
     1247                                compiler.errorMessenger.Output(54,"End Sub",FuncPtr);
    12481248                            else if(FuncType==ESC_MACRO)
    1249                                 SetError(54,"End Macro",FuncPtr);
     1249                                compiler.errorMessenger.Output(54,"End Macro",FuncPtr);
    12501250                            return;
    12511251                        }
     
    12651265                        if(FuncNum!=0||i3!=FuncType){
    12661266                            if(basbuf[i2+1]==ESC_ENDFUNCTION)
    1267                                 SetError(12,"End Function",i2);
     1267                                compiler.errorMessenger.Output(12,"End Function",i2);
    12681268                            else if(basbuf[i2+1]==ESC_ENDSUB)
    1269                                 SetError(12,"End Sub",i2);
     1269                                compiler.errorMessenger.Output(12,"End Sub",i2);
    12701270                            else if(basbuf[i2+1]==ESC_ENDMACRO)
    1271                                 SetError(12,"End Macro",i2);
     1271                                compiler.errorMessenger.Output(12,"End Macro",i2);
    12721272                            return;
    12731273                        }
Note: See TracChangeset for help on using the changeset viewer.