OSDN Git Service

compiler-calculated maximum value for `m_SourceDefs` (#966)
[winmerge-jp/winmerge-jp.git] / Externals / crystaledit / editlib / parsers / crystallineparser.h
index 5838b5d..1098cdd 100644 (file)
@@ -68,8 +68,9 @@ struct TEXTBLOCK
 \r
 typedef enum\r
 {\r
-       SRC_PLAIN,\r
+       SRC_PLAIN = 0,\r
        SRC_ASP,\r
+       SRC_AUTOIT,\r
        SRC_BASIC,\r
        SRC_BATCH,\r
        SRC_C,\r
@@ -83,6 +84,8 @@ typedef enum
        SRC_INNOSETUP,\r
        SRC_INSTALLSHIELD,\r
        SRC_JAVA,\r
+       SRC_JAVASCRIPT,\r
+       SRC_JSON,\r
        SRC_LISP,\r
        SRC_LUA,\r
        SRC_NSIS,\r
@@ -99,12 +102,14 @@ typedef enum
        SRC_SGML,\r
        SRC_SH,\r
        SRC_SIOD,\r
+       SRC_SMARTY,\r
        SRC_SQL,\r
        SRC_TCL,\r
        SRC_TEX,\r
        SRC_VERILOG,\r
        SRC_VHDL,\r
-       SRC_XML\r
+       SRC_XML,\r
+       SRC_MAX_ENTRY   /* always last entry, used for bound checking */\r
 }\r
 TextType;\r
 \r
@@ -125,7 +130,7 @@ struct TextDefinition
        unsigned encoding;\r
 };\r
 \r
-extern TextDefinition m_SourceDefs[37];\r
+extern TextDefinition m_SourceDefs[SRC_MAX_ENTRY];\r
 \r
 bool IsXKeyword(const TCHAR *pszKey, size_t nKeyLen, const TCHAR *pszKeywordList[], size_t nKeywordListCount, int(*compare)(const TCHAR *, const TCHAR *, size_t));\r
 bool IsXNumber(const TCHAR* pszChars, int nLength);\r
@@ -134,12 +139,16 @@ bool IsHtmlUser1Keyword(const TCHAR *pszChars, int nLength);
 bool IsHtmlUser2Keyword(const TCHAR *pszChars, int nLength);\r
 \r
 TextDefinition *GetTextType(const TCHAR *pszExt);\r
+TextDefinition* GetTextType(int index);\r
+void SetExtension(int index, const TCHAR *pszExts);\r
 \r
 unsigned ParseLinePlain(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineAsp(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
+unsigned ParseLineAutoIt(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineBasic(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineBatch(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineC(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
+unsigned ParseLineCJava(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems, bool (*IsKeyword)(const TCHAR *pszChars, int nLength), bool (*IsUser1Keyword)(const TCHAR *pszChars, int nLength));\r
 unsigned ParseLineCSharp(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineCss(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineDcl(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
@@ -151,6 +160,7 @@ unsigned ParseLineIni(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEX
 unsigned ParseLineInnoSetup(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineIS(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineJava(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
+unsigned ParseLineJavaScript(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineLisp(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineLua(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineNsis(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
@@ -168,6 +178,8 @@ unsigned ParseLineRust(unsigned dwCookie, const TCHAR *pszChars, int nLength, TE
 unsigned ParseLineSgml(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineSh(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineSiod(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
+unsigned ParseLineSmarty(unsigned dwCookie, const TCHAR* pszChars, int nLength, TEXTBLOCK* pBuf, int& nActualItems);\r
+unsigned ParseLineSmartyLanguage(unsigned dwCookie, const TCHAR* pszChars, int nLength, TEXTBLOCK* pBuf, int& nActualItems);\r
 unsigned ParseLineSql(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineTcl(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r
 unsigned ParseLineTex(unsigned dwCookie, const TCHAR *pszChars, int nLength, TEXTBLOCK * pBuf, int &nActualItems);\r