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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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{
Note: See TracChangeset for help on using the changeset viewer.