Changeset 364 in dev for trunk/abdev/ProjectEditor


Ignore:
Timestamp:
Nov 11, 2007, 3:12:06 PM (17 years ago)
Author:
dai_9181
Message:

Throw→Catch間のパラメータ引渡しに対応。
グローバル領域でのTryスコープを可能にした。これで例外処理機構実装完了。
エディタの補間機能にTry/Catch/Finally/EndTryを追加。

Location:
trunk/abdev/ProjectEditor
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/ProjectEditor/Common.h

    r350 r364  
    6666#define APPLICATION_NAME "ActiveBasic 5.0"
    6767#define VERSION_APPLI_NAME APPLICATION_NAME
    68 #define VERSION_STRING "5.00.00 (rev.356)"
     68#define VERSION_STRING "5.00.00 (rev.375)"
    6969
    7070#endif
  • trunk/abdev/ProjectEditor/EndPairCommandComplement.cpp

    r118 r364  
    7575    if(lstrcmpi(temporary,"Select")==0) return COM_SELECT;
    7676    if(lstrcmpi(temporary,"Sub")==0) return COM_SUB;
     77    if(lstrcmpi(temporary,"Try")==0) return COM_TRY;
    7778    if(lstrcmpi(temporary,"Type")==0) return COM_TYPE;
    7879    if(lstrcmpi(temporary,"While")==0) return COM_WHILE;
     
    150151            lstrcpy(buffer,"End Sub");
    151152            break;
     153        case COM_TRY:
     154            lstrcpy(buffer,"End Try");
     155            break;
    152156        case COM_TYPE:
    153157            lstrcpy(buffer,"End Type");
     
    317321        ComplementWndInfo.pMemberInfo[1].dwProc=0;
    318322        ComplementWndInfo.pMemberInfo[1].dwAccess=ACCESS_PAIRCOMMAND;
     323    }
     324    else if(CmdId==COM_TRY){
     325        ComplementWndInfo.pMemberInfo=(MEMBERINFO *)HeapAlloc(hHeap,0,sizeof(MEMBERINFO)*4);
     326        ComplementWndInfo.MemberNum=3;
     327
     328        ComplementWndInfo.pMemberInfo[0].pName=(char *)HeapAlloc(hHeap,0,10);
     329        lstrcpy(ComplementWndInfo.pMemberInfo[0].pName,"End Try");
     330        ComplementWndInfo.pMemberInfo[0].dwProc=0;
     331        ComplementWndInfo.pMemberInfo[0].dwAccess=ACCESS_PAIRCOMMAND;
     332
     333        ComplementWndInfo.pMemberInfo[1].pName=(char *)HeapAlloc(hHeap,0,10);
     334        lstrcpy(ComplementWndInfo.pMemberInfo[1].pName,"Catch");
     335        ComplementWndInfo.pMemberInfo[1].dwProc=0;
     336        ComplementWndInfo.pMemberInfo[1].dwAccess=ACCESS_PAIRCOMMAND;
     337
     338        ComplementWndInfo.pMemberInfo[2].pName=(char *)HeapAlloc(hHeap,0,8);
     339        lstrcpy(ComplementWndInfo.pMemberInfo[2].pName,"Finally");
     340        ComplementWndInfo.pMemberInfo[2].dwProc=0;
     341        ComplementWndInfo.pMemberInfo[2].dwAccess=ACCESS_PAIRCOMMAND;
    319342    }
    320343    else{
  • trunk/abdev/ProjectEditor/SubOperation.cpp

    r350 r364  
    439439        case COM_SELECT:
    440440        case COM_SUB:
     441        case COM_TRY:
    441442        case COM_TYPE:
    442443        case COM_TYPEDEF:
     
    465466    }
    466467    else if(str[0]=='c'||str[0]=='C'){
     468        if(lstrcmpi(str,"Catch")==0) return -1;
    467469        if(lstrcmpi(str,"Case")==0) return -1;
    468470        if(lstrcmp(str,"Char")==0) return -1;
     
    508510        if(lstrcmp(str,"False")==0) return -1;
    509511        if(lstrcmpi(str,"Field")==0) return COM_FIELD;
     512        if(lstrcmpi(str,"Finally")==0) return -1;
    510513        if(lstrcmpi(str,"For")==0) return COM_FOR;
    511514        if(lstrcmpi(str,"Function")==0) return COM_FUNCTION;
     
    583586        if(lstrcmpi(str,"Then")==0) return -1;
    584587        if(lstrcmpi(str,"This")==0) return -1;
     588        if(lstrcmpi(str,"Throw")==0) return -1;
    585589        if(lstrcmp(str,"True")==0) return -1;
     590        if(lstrcmp(str,"Try")==0) return COM_TRY;
    586591        if(lstrcmpi(str,"Type")==0) return COM_TYPE;
    587592        if(lstrcmpi(str,"TypeDef")==0) return COM_TYPEDEF;
  • trunk/abdev/ProjectEditor/TextEditor_KeyEvent.cpp

    r118 r364  
    8282        lstrcmpi(temporary,"Private")==0||
    8383        lstrcmpi(temporary,"Protected")==0||
    84         lstrcmpi(temporary,"Public")==0
     84        lstrcmpi(temporary,"Public")==0||
     85
     86        lstrcmpi(temporary,"Try")==0||
     87        lstrcmpi(temporary,"Catch")==0||
     88        lstrcmpi(temporary,"Finally")==0
    8589        ) return 1;
    8690    else if(lstrcmpi(temporary,"Select")==0) return 2;
     
    135139        lstrcmpi(temporary,"Private")==0||
    136140        lstrcmpi(temporary,"Protected")==0||
    137         lstrcmpi(temporary,"Public")==0
     141        lstrcmpi(temporary,"Public")==0||
     142
     143        lstrcmpi(temporary,"Catch")==0||
     144        lstrcmpi(temporary,"Finally")==0
    138145        ) return 1;
    139146    else if(lstrcmpi(temporary,"EndSelect")==0) return 2;
     
    816823    if(
    817824        pobj_nv->BackNum_PairStatementComplement&&
    818         (nVirtualKey=='c'||nVirtualKey=='C'||       //Case
     825        (nVirtualKey=='c'||nVirtualKey=='C'||       //Case、Catch
    819826        nVirtualKey=='e'||nVirtualKey=='E'||        //End ~
     827        nVirtualKey=='f'||nVirtualKey=='F'||        //Finally
    820828        nVirtualKey=='l'||nVirtualKey=='L'||        //Loop
    821829        nVirtualKey=='n'||nVirtualKey=='N'||        //Next
Note: See TracChangeset for help on using the changeset viewer.