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/BasicCompiler32/Compile_Statement.cpp

    r435 r465  
    1616            //ダブルクォートは不正なのでエラー扱い
    1717            leftTerm[i]=0;
    18             SetError(3,leftTerm,cp);
     18            compiler.errorMessenger.Output(3,leftTerm,cp);
    1919            return;
    2020        }
     
    4848        (leftTerm[0]==1&&leftTerm[1]==ESC_PSMEM)
    4949        )){
    50         SetError(1,NULL,cp);
     50        compiler.errorMessenger.Output(1,NULL,cp);
    5151        return;
    5252    }
     
    7676        if(pUserProc){
    7777            if( !pUserProc->IsMacro() ){
    78                 SetError(10,Command,cp);
     78                compiler.errorMessenger.Output(10,Command,cp);
    7979            }
    8080
     
    117117
    118118    // どこにも当てはまらなかったため、失敗
    119     SetError(1,NULL,cp);
     119    compiler.errorMessenger.Output(1,NULL,cp);
    120120}
    121121
     
    126126    for(i=0;;i++){
    127127        if(Parameter[i]=='\0'){
    128             SetError(21,NULL,cp);
     128            compiler.errorMessenger.Output(21,NULL,cp);
    129129            return;
    130130        }
     
    355355    compiler.codeGenerator.ContinueAreaBegin();
    356356
    357     if(!Parameter[0]) SetError(10,"While",cp);
     357    if(!Parameter[0]) compiler.errorMessenger.Output(10,"While",cp);
    358358
    359359    const PertialSchedule *pWhilePertialSchedule = NULL;
     
    483483    i=GetOneParameter(Parameter,0,temporary);
    484484    if(!Parameter[i]){
    485         SetError(12,"For",cp);
     485        compiler.errorMessenger.Output(12,"For",cp);
    486486        goto ErrorStep;
    487487    }
     
    496496        }
    497497        if(temporary[i2]=='\0'){
    498             SetError(12,"For",cp);
     498            compiler.errorMessenger.Output(12,"For",cp);
    499499            goto ErrorStep;
    500500        }
     
    514514    if(Parameter[i]){
    515515        i=GetOneParameter(Parameter,i,StepNum);
    516         if(Parameter[i]) SetError(12,"For",cp);
     516        if(Parameter[i]) compiler.errorMessenger.Output(12,"For",cp);
    517517    }
    518518    else lstrcpy(StepNum,"1");
     
    578578    if(szNextVariable[0]){
    579579        if(lstrcmp(szNextVariable,variable)!=0){
    580             SetError(55,szNextVariable,cp);
     580            compiler.errorMessenger.Output(55,szNextVariable,cp);
    581581        }
    582582    }
     
    608608    GetCustomToken( variable, Parameter, i, ESC_IN, true );
    609609    if(!Parameter[i]){
    610         SetError(12,"Foreach",cp);
     610        compiler.errorMessenger.Output(12,"Foreach",cp);
    611611        isError = true;
    612612        goto ErrorStep;
     
    667667    if(szNextVariable[0]){
    668668        if(lstrcmp(szNextVariable,variable)!=0){
    669             SetError(55,szNextVariable,cp);
     669            compiler.errorMessenger.Output(55,szNextVariable,cp);
    670670        }
    671671    }
     
    691691    int i,i2,i3;
    692692
    693     if(Parameter[0]) SetError(10,"Do",cp);
     693    if(Parameter[0]) compiler.errorMessenger.Output(10,"Do",cp);
    694694
    695695    //Continueアドレスのバックアップとセット
     
    894894void OpcodeExitSub(void){
    895895    if( UserProc::IsGlobalAreaCompiling() ){
    896         SetError(12,"Exit Sub/Function",cp);
     896        compiler.errorMessenger.Output(12,"Exit Sub/Function",cp);
    897897        return;
    898898    }
     
    942942            if(basbuf[i]=='\0'){
    943943                selectSchedules.pop_back();
    944                 SetError(22,"Select",cp);
     944                compiler.errorMessenger.Output(22,"Select",cp);
    945945                return;
    946946            }
     
    11631163
    11641164    if(selectSchedules.back().typeSize==-1){
    1165         SetError(30,"Case",cp);
     1165        compiler.errorMessenger.Output(30,"Case",cp);
    11661166        return;
    11671167    }
     
    12821282    i=GetOneParameter(Parameter,0,temporary);
    12831283    if(!Parameter[i]){
    1284         SetError(1,NULL,cp);
     1284        compiler.errorMessenger.Output(1,NULL,cp);
    12851285        return;
    12861286    }
     
    12911291    }
    12921292    if(!resultType.IsWhole()){
    1293         SetError(11,Parameter,cp);
     1293        compiler.errorMessenger.Output(11,Parameter,cp);
    12941294        return;
    12951295    }
     
    13001300    i=GetOneParameter(Parameter,i,temporary);
    13011301    if(Parameter[i]){
    1302         SetError(1,NULL,cp);
     1302        compiler.errorMessenger.Output(1,NULL,cp);
    13031303        return;
    13041304    }
Note: See TracChangeset for help on using the changeset viewer.