123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- // Syntax.h
- enum {
- COLORINDEX_COMMENT,
- COLORINDEX_SYNTAX,
- COLORINDEX_NORMAL,
- COLORINDEX_NUMBER,
- COLORINDEX_STRING,
- COLORINDEX_CHAR,
- COLORINDEX_BK,
- COLORINDEX_UNDERLINE,
- COLORINDEX_LINEEND,
- COLORINDEX_BKCURLINE,
- COLORINDEX_LINNUMBERBKCOLOR,
- COLORINDEX_LINNUMBERNORMAL,
- COLORINDEX_CURLINNUMBER,
- COLORINDEX_LINNUMBERSEP,
- COLORINDEX_CROSS,
- COLORINDEX_TAB,
- COLORINDEX_SPACE,
- COLORINDEX_BKSELTEXT,
- };
- enum {
- _ADA,
- _AML,
- _ASM,
- _BASIC,
- _BATCH,
- _BLUE,
- _CLIPPER,
- _COBOL,
- _CPP,
- _CSHAPE,
- _DATAFLEX,
- _EIFFEL,
- _FORTRAN,
- _HLBL,
- _HTML,
- _INI,
- _JAVA,
- _JSP,
- _LIMBO,
- _LISP,
- _MODULA2,
- _OBJECTPASCAL,
- _PARADOX,
- _PERL,
- _PHP,
- _PL1,
- _PROGRESS,
- _PYTHON,
- _REBOL,
- _REXX,
- _RUBY,
- _SMALLTALK,
- _SQL,
- _VHDL,
- _XML
- };
- #define COOKIE_COMMENT 0x0002
- #define COOKIE_EXT_COMMENT 0x0004
- #define COOKIE_STRING 0x0010
- #define COOKIE_CHAR 0x0020
- #define COOKIE_SCRIPT 0x0040 //For Html Parser
- #define COOKIE_TAG 0x0080 //For Html Parser
- //¶¨ÒåÑÕÉ«¿éºê
- #define DEFINE_BLOCK(pos, color) \
- ASSERT((pos) >= 0 && (pos) <= nLength);\
- if (ColorInfo != NULL)\
- {\
- if (nActualItems == 0 || ColorInfo[nActualItems - 1].Pos <= (pos)) {\
- ColorInfo[nActualItems].Pos = (pos);\
- ColorInfo[nActualItems].Color = (color);\
- nActualItems ++;\
- }\
- }
- struct COLORINFO {
- int Pos;
- int Color;
- };
- void SetCurLanguage(int nLanguage);
- void LoadSynWord(CStringArray &m_strArrayKeyWords, int nLanguage);
- BOOL IsSynWord(CStringArray &m_strArrayKeyWords, CString &strReadyToTest);
- BOOL IsNumber(CString &strReadyToTest);
- void SortSynWordArray(CStringArray &m_strArrayKeyWords);
- DWORD ParseLine(CStringArray &m_strArrayKeyWords, DWORD dwCookie, CString &strLine, COLORINFO *ColorInfo, int &nActualItems);
- DWORD ParseLineForHtml(CStringArray &m_strArrayKeyWords, DWORD dwCookie, CString &strLine, COLORINFO *ColorInfo, int &nActualItems);
- void LoadParseRule(int nlanguage);
- CString GetLanguageString(int nlanguage);
- void DeleteAllocString();
- CString GetLineCommentString(int nlanguage);
- int GetLanguageByStringShow(CString strlanguage);
- CString GetStringShowByLanguage(int nlanguage);
|