Ignore:
Timestamp:
Jul 12, 2008, 9:23:52 PM (15 years ago)
Author:
dai_9181
Message:

・TinyXMLをabdevプロジェクトで使えるようにした。
・コードハイライターを汎用的に実装しなおした。syntaxファイルを読み込む仕様とした。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/abdev/SubOperation.cpp

    r655 r681  
    413413    return ans;
    414414}
    415 BOOL IsManagementCommand(int ComNum){
    416     switch(ComNum){
    417         case -1:
    418         case COM_ABSTRACT:
    419         case COM_CLASS:
    420         case COM_CONST:
    421         case COM_DEBUG:
    422         case COM_DECLARE:
    423         case COM_DEF:
    424         case COM_DIM:
    425         case COM_DO:
    426         case COM_END:
    427         case COM_ENUM:
    428         case COM_FOR:
    429         case COM_FUNCTION:
    430         case COM_GOSUB:
    431         case COM_GOTO:
    432         case COM_IF:
    433         case COM_INHERITS:
    434         case COM_INTERFACE:
    435         case COM_LOOP:
    436         case COM_NAMESPACE:
    437         case COM_NEXT:
    438         case COM_PRIVATE:
    439         case COM_PROTECTED:
    440         case COM_PUBLIC:
    441         case COM_RETURN:
    442         case COM_SELECT:
    443         case COM_SUB:
    444         case COM_TRY:
    445         case COM_TYPE:
    446         case COM_TYPEDEF:
    447         case COM_VIRTUAL:
    448         case COM_OVERRIDE:
    449         case COM_WEND:
    450         case COM_WHILE:
    451         case COM_WITH:
    452             return 1;
    453         default:
    454             break;
    455     }
    456     return 0;
    457 }
    458 int IsBasicReservedWord(char *str){
    459     if(str[0]=='a'||str[0]=='A'){
    460         if(lstrcmpi(str,"Abstract")==0) return COM_ABSTRACT;
    461         if(lstrcmpi(str,"As")==0) return -1;
    462     }
    463     else if(str[0]=='b'||str[0]=='B'){
    464         if(lstrcmpi(str,"Beep")==0) return COM_BEEP;
    465         if(lstrcmp(str,"Boolean")==0) return -1;
    466         if(lstrcmpi(str,"ByRef")==0) return -1;
    467         if(lstrcmpi(str,"ByVal")==0) return -1;
    468         if(lstrcmp(str,"Byte")==0) return -1;
    469     }
    470     else if(str[0]=='c'||str[0]=='C'){
    471         if(lstrcmpi(str,"Catch")==0) return -1;
    472         if(lstrcmpi(str,"Case")==0) return -1;
    473         if(lstrcmp(str,"Char")==0) return -1;
    474         if(lstrcmpi(str,"ChDir")==0) return COM_CHDIR;
    475         if(lstrcmpi(str,"Circle")==0) return COM_CIRCLE;
    476         if(lstrcmpi(str,"Class")==0) return COM_CLASS;
    477         if(lstrcmpi(str,"Close")==0) return COM_CLOSE;
    478         if(lstrcmpi(str,"Cls")==0) return COM_CLS;
    479         if(lstrcmpi(str,"Color")==0) return COM_COLOR;
    480         if(lstrcmpi(str,"Const")==0) return COM_CONST;
    481         if(lstrcmpi(str,"Continue")==0) return -1;
    482     }
    483     else if(str[0]=='d'||str[0]=='D'){
    484         if(lstrcmpi(str,"Debug")==0) return COM_DEBUG;
    485         if(lstrcmpi(str,"Declare")==0) return COM_DECLARE;
    486         if(lstrcmpi(str,"Def")==0) return COM_DEF;
    487         if(lstrcmpi(str,"Delegate")==0) return -1;
    488         if(lstrcmpi(str,"Delete")==0) return -1;
    489         if(lstrcmpi(str,"DelWnd")==0) return COM_DELWND;
    490         if(lstrcmpi(str,"Dim")==0) return COM_DIM;
    491         if(lstrcmpi(str,"Do")==0) return COM_DO;
    492         if(lstrcmp(str,"Double")==0) return -1;
    493         if(lstrcmp(str,"DWord")==0) return -1;
    494     }
    495     else if(str[0]=='e'||str[0]=='E'){
    496         if(lstrcmpi(str,"Else")==0) return -1;
    497         if(lstrcmpi(str,"ElseIf")==0) return -1;
    498         if(lstrcmpi(str,"End")==0) return COM_END;
    499         if(lstrcmpi(str,"EndIf")==0) return -1;
    500         if(lstrcmpi(str,"EndFunction")==0) return -1;
    501         if(lstrcmpi(str,"EndSub")==0) return -1;
    502         if(lstrcmpi(str,"EndType")==0) return -1;
    503         if(lstrcmpi(str,"EndSelect")==0) return -1;
    504         if(lstrcmpi(str,"EndWith")==0) return -1;
    505         if(lstrcmpi(str,"Enum")==0) return COM_ENUM;
    506         if(lstrcmpi(str,"Exit")==0) return -1;
    507         if(lstrcmpi(str,"ExitDo")==0) return -1;
    508         if(lstrcmpi(str,"ExitFor")==0) return -1;
    509         if(lstrcmpi(str,"ExitFunction")==0) return -1;
    510         if(lstrcmpi(str,"ExitSub")==0) return -1;
    511         if(lstrcmpi(str,"ExitWhile")==0) return -1;
    512     }
    513     else if(str[0]=='f'||str[0]=='F'){
    514         if(lstrcmp(str,"False")==0) return -1;
    515         if(lstrcmpi(str,"Field")==0) return COM_FIELD;
    516         if(lstrcmpi(str,"Finally")==0) return -1;
    517         if(lstrcmpi(str,"For")==0) return COM_FOR;
    518         if(lstrcmpi(str,"Foreach")==0) return -1;
    519         if(lstrcmpi(str,"Function")==0) return COM_FUNCTION;
    520     }
    521     else if(str[0]=='g'||str[0]=='G'){
    522         if(lstrcmpi(str,"Get")==0) return COM_GET;
    523         if(lstrcmpi(str,"GoSub")==0) return COM_GOSUB;
    524         if(lstrcmpi(str,"Goto")==0) return COM_GOTO;
    525     }
    526     else if(str[0]=='i'||str[0]=='I'){
    527         if(lstrcmpi(str,"If")==0) return COM_IF;
    528         if(lstrcmpi(str,"Imports")==0) return -1;
    529         if(lstrcmpi(str,"Implements")==0) return -1;
    530         if(lstrcmpi(str,"In")==0) return -1;
    531         if(lstrcmpi(str,"Inherits")==0) return COM_INHERITS;
    532         if(lstrcmpi(str,"Input")==0) return COM_INPUT;
    533         if(lstrcmp(str,"Int64")==0) return -1;
    534         if(lstrcmp(str,"Integer")==0) return -1;
    535         if(lstrcmpi(str,"Interface")==0) return COM_INTERFACE;
    536     }
    537     else if(str[0]=='k'||str[0]=='K'){
    538         if(lstrcmpi(str,"Kill")==0) return COM_KILL;
    539     }
    540     else if(str[0]=='l'||str[0]=='L'){
    541         if(lstrcmpi(str,"Let")==0) return COM_LET;
    542         if(lstrcmpi(str,"Line")==0) return COM_LINE;
    543         if(lstrcmpi(str,"Locate")==0) return COM_LOCATE;
    544         if(lstrcmp(str,"Long")==0) return -1;
    545         if(lstrcmpi(str,"Loop")==0) return COM_LOOP;
    546     }
    547     else if(str[0]=='m'||str[0]=='M'){
    548         if(lstrcmpi(str,"MkDir")==0) return COM_MKDIR;
    549         if(lstrcmpi(str,"MsgBox")==0) return COM_MSGBOX;
    550     }
    551     else if(str[0]=='n'||str[0]=='N'){
    552         if(lstrcmpi(str,"Namespace")==0) return COM_NAMESPACE;
    553         if(lstrcmpi(str,"Next")==0) return COM_NEXT;
    554         if(lstrcmpi(str,"New")==0) return -1;
    555         if(lstrcmpi(str,"Nothing")==0) return -1;
    556     }
    557     else if(str[0]=='o'||str[0]=='O'){
    558         if(lstrcmp(str,"Object")==0) return -1;
    559         if(lstrcmpi(str,"Open")==0) return COM_OPEN;
    560         if(lstrcmpi(str,"Operator")==0) return -1;
    561         if(lstrcmpi(str,"Override")==0) return COM_OVERRIDE;
    562     }
    563     else if(str[0]=='p'||str[0]=='P'){
    564         if(lstrcmpi(str,"Paint")==0) return COM_PAINT;
    565         if(lstrcmpi(str,"Print")==0) return COM_PRINT;
    566         if(lstrcmpi(str,"Private")==0) return COM_PRIVATE;
    567         if(lstrcmpi(str,"Protected")==0) return COM_PROTECTED;
    568         if(lstrcmpi(str,"PSet")==0) return COM_PSET;
    569         if(lstrcmpi(str,"Put")==0) return COM_PUT;
    570         if(lstrcmpi(str,"Public")==0) return COM_PUBLIC;
    571     }
    572     else if(str[0]=='q'||str[0]=='Q'){
    573         if(lstrcmp(str,"QWord")==0) return -1;
    574     }
    575     else if(str[0]=='r'||str[0]=='R'){
    576         if(lstrcmpi(str,"Randomize")==0) return COM_RANDOMIZE;
    577         if(lstrcmpi(str,"Rem")==0) return COM_REM;
    578         if(lstrcmpi(str,"Return")==0) return COM_RETURN;
    579     }
    580     else if(str[0]=='s'||str[0]=='S'){
    581         if(lstrcmp(str,"SByte")==0) return -1;
    582         if(lstrcmpi(str,"Select")==0) return COM_SELECT;
    583         if(lstrcmpi(str,"SelectCase")==0) return COM_SELECT;
    584         if(lstrcmp(str,"Single")==0) return -1;
    585         if(lstrcmpi(str,"Sleep")==0) return COM_SLEEP;
    586         if(lstrcmp(str,"Static")==0) return -1;
    587         if(lstrcmpi(str,"Step")==0) return -1;
    588         if(lstrcmp(str,"String")==0) return -1;
    589         if(lstrcmpi(str,"Sub")==0) return COM_SUB;
    590         if(lstrcmpi(str,"Super")==0) return -1;
    591     }
    592     else if(str[0]=='t'||str[0]=='T'){
    593         if(lstrcmpi(str,"Then")==0) return -1;
    594         if(lstrcmpi(str,"This")==0) return -1;
    595         if(lstrcmpi(str,"Throw")==0) return -1;
    596         if(lstrcmpi(str,"To")==0) return -1;
    597         if(lstrcmp(str,"True")==0) return -1;
    598         if(lstrcmp(str,"Try")==0) return COM_TRY;
    599         if(lstrcmpi(str,"Type")==0) return COM_TYPE;
    600         if(lstrcmpi(str,"TypeDef")==0) return COM_TYPEDEF;
    601     }
    602     else if(str[0]=='u'||str[0]=='U'){
    603         if(lstrcmpi(str,"Until")==0) return -1;
    604     }
    605     else if(str[0]=='v'||str[0]=='V'){
    606         if(lstrcmpi(str,"Virtual")==0) return COM_VIRTUAL;
    607     }
    608     else if(str[0]=='w'||str[0]=='W'){
    609         if(lstrcmpi(str,"Wend")==0) return COM_WEND;
    610         if(lstrcmpi(str,"While")==0) return COM_WHILE;
    611         if(lstrcmpi(str,"Window")==0) return COM_WINDOW;
    612         if(lstrcmpi(str,"With")==0) return COM_WITH;
    613         if(lstrcmp(str,"Word")==0) return -1;
    614         if(lstrcmpi(str,"Write")==0) return COM_WRITE;
    615     }
    616     else if(str[0]=='#'){
    617         if(lstrcmpi(str,"#include")==0) return -1;
    618         if(lstrcmpi(str,"#strict")==0) return -1;
    619         if(lstrcmpi(str,"#console")==0) return -1;
    620         if(lstrcmpi(str,"#prompt")==0) return -1;
    621         if(lstrcmpi(str,"#N88BASIC")==0) return -1;
    622         if(lstrcmpi(str,"#define")==0) return -1;
    623         if(lstrcmpi(str,"#ifdef")==0) return -1;
    624         if(lstrcmpi(str,"#ifndef")==0) return -1;
    625         if(lstrcmpi(str,"#else")==0) return -1;
    626         if(lstrcmpi(str,"#endif")==0) return -1;
    627     }
    628     return 0;
    629 }
    630 
    631415HBITMAP CreateGradationBitmap(SIZE *pSize,COLORREF color1,COLORREF color2){
    632416    //グラデーションビットマップを生成
Note: See TracChangeset for help on using the changeset viewer.