Batch insert lexer modules for smaller code.

https://sourceforge.net/p/scintilla/feature-requests/1388/
This commit is contained in:
Zufu Liu 2021-04-03 11:04:05 +11:00 committed by Neil Hodgson
parent ab443e7d19
commit 7e316174c7
3 changed files with 139 additions and 131 deletions

View File

@ -39,6 +39,10 @@ public:
lexerCatalogue.push_back(plm); lexerCatalogue.push_back(plm);
} }
void AddLexerModules(std::initializer_list<LexerModule *> modules) {
lexerCatalogue.insert(lexerCatalogue.end(), modules);
}
unsigned int Count() const noexcept { unsigned int Count() const noexcept {
return static_cast<unsigned int>(lexerCatalogue.size()); return static_cast<unsigned int>(lexerCatalogue.size());
} }

View File

@ -43,6 +43,7 @@
#include <vector> #include <vector>
#include <map> #include <map>
#include <set> #include <set>
#include <initializer_list>
#include <algorithm> #include <algorithm>
#include <iterator> #include <iterator>
#include <functional> #include <functional>

View File

@ -9,6 +9,7 @@
#include <cstring> #include <cstring>
#include <vector> #include <vector>
#include <initializer_list>
#if _WIN32 #if _WIN32
#define EXPORT_FUNCTION __declspec(dllexport) #define EXPORT_FUNCTION __declspec(dllexport)
@ -169,139 +170,141 @@ void AddEachLexer() {
return; return;
} }
//++Autogenerated -- run scripts/LexGen.py to regenerate catalogueLexilla.AddLexerModules({
//**\(\tcatalogueLexilla.AddLexerModule(&\*);\n\) //++Autogenerated -- run scripts/LexillaGen.py to regenerate
catalogueLexilla.AddLexerModule(&lmA68k); //**\(\t\t&\*,\n\)
catalogueLexilla.AddLexerModule(&lmAbaqus); &lmA68k,
catalogueLexilla.AddLexerModule(&lmAda); &lmAbaqus,
catalogueLexilla.AddLexerModule(&lmAPDL); &lmAda,
catalogueLexilla.AddLexerModule(&lmAs); &lmAPDL,
catalogueLexilla.AddLexerModule(&lmAsm); &lmAs,
catalogueLexilla.AddLexerModule(&lmAsn1); &lmAsm,
catalogueLexilla.AddLexerModule(&lmASY); &lmAsn1,
catalogueLexilla.AddLexerModule(&lmAU3); &lmASY,
catalogueLexilla.AddLexerModule(&lmAVE); &lmAU3,
catalogueLexilla.AddLexerModule(&lmAVS); &lmAVE,
catalogueLexilla.AddLexerModule(&lmBaan); &lmAVS,
catalogueLexilla.AddLexerModule(&lmBash); &lmBaan,
catalogueLexilla.AddLexerModule(&lmBatch); &lmBash,
catalogueLexilla.AddLexerModule(&lmBibTeX); &lmBatch,
catalogueLexilla.AddLexerModule(&lmBlitzBasic); &lmBibTeX,
catalogueLexilla.AddLexerModule(&lmBullant); &lmBlitzBasic,
catalogueLexilla.AddLexerModule(&lmCaml); &lmBullant,
catalogueLexilla.AddLexerModule(&lmCIL); &lmCaml,
catalogueLexilla.AddLexerModule(&lmClw); &lmCIL,
catalogueLexilla.AddLexerModule(&lmClwNoCase); &lmClw,
catalogueLexilla.AddLexerModule(&lmCmake); &lmClwNoCase,
catalogueLexilla.AddLexerModule(&lmCOBOL); &lmCmake,
catalogueLexilla.AddLexerModule(&lmCoffeeScript); &lmCOBOL,
catalogueLexilla.AddLexerModule(&lmConf); &lmCoffeeScript,
catalogueLexilla.AddLexerModule(&lmCPP); &lmConf,
catalogueLexilla.AddLexerModule(&lmCPPNoCase); &lmCPP,
catalogueLexilla.AddLexerModule(&lmCsound); &lmCPPNoCase,
catalogueLexilla.AddLexerModule(&lmCss); &lmCsound,
catalogueLexilla.AddLexerModule(&lmD); &lmCss,
catalogueLexilla.AddLexerModule(&lmDataflex); &lmD,
catalogueLexilla.AddLexerModule(&lmDiff); &lmDataflex,
catalogueLexilla.AddLexerModule(&lmDMAP); &lmDiff,
catalogueLexilla.AddLexerModule(&lmDMIS); &lmDMAP,
catalogueLexilla.AddLexerModule(&lmECL); &lmDMIS,
catalogueLexilla.AddLexerModule(&lmEDIFACT); &lmECL,
catalogueLexilla.AddLexerModule(&lmEiffel); &lmEDIFACT,
catalogueLexilla.AddLexerModule(&lmEiffelkw); &lmEiffel,
catalogueLexilla.AddLexerModule(&lmErlang); &lmEiffelkw,
catalogueLexilla.AddLexerModule(&lmErrorList); &lmErlang,
catalogueLexilla.AddLexerModule(&lmESCRIPT); &lmErrorList,
catalogueLexilla.AddLexerModule(&lmF77); &lmESCRIPT,
catalogueLexilla.AddLexerModule(&lmFlagShip); &lmF77,
catalogueLexilla.AddLexerModule(&lmForth); &lmFlagShip,
catalogueLexilla.AddLexerModule(&lmFortran); &lmForth,
catalogueLexilla.AddLexerModule(&lmFreeBasic); &lmFortran,
catalogueLexilla.AddLexerModule(&lmFSharp); &lmFreeBasic,
catalogueLexilla.AddLexerModule(&lmGAP); &lmFSharp,
catalogueLexilla.AddLexerModule(&lmGui4Cli); &lmGAP,
catalogueLexilla.AddLexerModule(&lmHaskell); &lmGui4Cli,
catalogueLexilla.AddLexerModule(&lmHollywood); &lmHaskell,
catalogueLexilla.AddLexerModule(&lmHTML); &lmHollywood,
catalogueLexilla.AddLexerModule(&lmIHex); &lmHTML,
catalogueLexilla.AddLexerModule(&lmIndent); &lmIHex,
catalogueLexilla.AddLexerModule(&lmInno); &lmIndent,
catalogueLexilla.AddLexerModule(&lmJSON); &lmInno,
catalogueLexilla.AddLexerModule(&lmKix); &lmJSON,
catalogueLexilla.AddLexerModule(&lmKVIrc); &lmKix,
catalogueLexilla.AddLexerModule(&lmLatex); &lmKVIrc,
catalogueLexilla.AddLexerModule(&lmLISP); &lmLatex,
catalogueLexilla.AddLexerModule(&lmLiterateHaskell); &lmLISP,
catalogueLexilla.AddLexerModule(&lmLot); &lmLiterateHaskell,
catalogueLexilla.AddLexerModule(&lmLout); &lmLot,
catalogueLexilla.AddLexerModule(&lmLua); &lmLout,
catalogueLexilla.AddLexerModule(&lmMagikSF); &lmLua,
catalogueLexilla.AddLexerModule(&lmMake); &lmMagikSF,
catalogueLexilla.AddLexerModule(&lmMarkdown); &lmMake,
catalogueLexilla.AddLexerModule(&lmMatlab); &lmMarkdown,
catalogueLexilla.AddLexerModule(&lmMaxima); &lmMatlab,
catalogueLexilla.AddLexerModule(&lmMETAPOST); &lmMaxima,
catalogueLexilla.AddLexerModule(&lmMMIXAL); &lmMETAPOST,
catalogueLexilla.AddLexerModule(&lmModula); &lmMMIXAL,
catalogueLexilla.AddLexerModule(&lmMSSQL); &lmModula,
catalogueLexilla.AddLexerModule(&lmMySQL); &lmMSSQL,
catalogueLexilla.AddLexerModule(&lmNim); &lmMySQL,
catalogueLexilla.AddLexerModule(&lmNimrod); &lmNim,
catalogueLexilla.AddLexerModule(&lmNncrontab); &lmNimrod,
catalogueLexilla.AddLexerModule(&lmNsis); &lmNncrontab,
catalogueLexilla.AddLexerModule(&lmNull); &lmNsis,
catalogueLexilla.AddLexerModule(&lmOctave); &lmNull,
catalogueLexilla.AddLexerModule(&lmOpal); &lmOctave,
catalogueLexilla.AddLexerModule(&lmOScript); &lmOpal,
catalogueLexilla.AddLexerModule(&lmPascal); &lmOScript,
catalogueLexilla.AddLexerModule(&lmPB); &lmPascal,
catalogueLexilla.AddLexerModule(&lmPerl); &lmPB,
catalogueLexilla.AddLexerModule(&lmPHPSCRIPT); &lmPerl,
catalogueLexilla.AddLexerModule(&lmPLM); &lmPHPSCRIPT,
catalogueLexilla.AddLexerModule(&lmPO); &lmPLM,
catalogueLexilla.AddLexerModule(&lmPOV); &lmPO,
catalogueLexilla.AddLexerModule(&lmPowerPro); &lmPOV,
catalogueLexilla.AddLexerModule(&lmPowerShell); &lmPowerPro,
catalogueLexilla.AddLexerModule(&lmProgress); &lmPowerShell,
catalogueLexilla.AddLexerModule(&lmProps); &lmProgress,
catalogueLexilla.AddLexerModule(&lmPS); &lmProps,
catalogueLexilla.AddLexerModule(&lmPureBasic); &lmPS,
catalogueLexilla.AddLexerModule(&lmPython); &lmPureBasic,
catalogueLexilla.AddLexerModule(&lmR); &lmPython,
catalogueLexilla.AddLexerModule(&lmRaku); &lmR,
catalogueLexilla.AddLexerModule(&lmREBOL); &lmRaku,
catalogueLexilla.AddLexerModule(&lmRegistry); &lmREBOL,
catalogueLexilla.AddLexerModule(&lmRuby); &lmRegistry,
catalogueLexilla.AddLexerModule(&lmRust); &lmRuby,
catalogueLexilla.AddLexerModule(&lmSAS); &lmRust,
catalogueLexilla.AddLexerModule(&lmScriptol); &lmSAS,
catalogueLexilla.AddLexerModule(&lmSmalltalk); &lmScriptol,
catalogueLexilla.AddLexerModule(&lmSML); &lmSmalltalk,
catalogueLexilla.AddLexerModule(&lmSorc); &lmSML,
catalogueLexilla.AddLexerModule(&lmSpecman); &lmSorc,
catalogueLexilla.AddLexerModule(&lmSpice); &lmSpecman,
catalogueLexilla.AddLexerModule(&lmSQL); &lmSpice,
catalogueLexilla.AddLexerModule(&lmSrec); &lmSQL,
catalogueLexilla.AddLexerModule(&lmStata); &lmSrec,
catalogueLexilla.AddLexerModule(&lmSTTXT); &lmStata,
catalogueLexilla.AddLexerModule(&lmTACL); &lmSTTXT,
catalogueLexilla.AddLexerModule(&lmTADS3); &lmTACL,
catalogueLexilla.AddLexerModule(&lmTAL); &lmTADS3,
catalogueLexilla.AddLexerModule(&lmTCL); &lmTAL,
catalogueLexilla.AddLexerModule(&lmTCMD); &lmTCL,
catalogueLexilla.AddLexerModule(&lmTEHex); &lmTCMD,
catalogueLexilla.AddLexerModule(&lmTeX); &lmTEHex,
catalogueLexilla.AddLexerModule(&lmTxt2tags); &lmTeX,
catalogueLexilla.AddLexerModule(&lmVB); &lmTxt2tags,
catalogueLexilla.AddLexerModule(&lmVBScript); &lmVB,
catalogueLexilla.AddLexerModule(&lmVerilog); &lmVBScript,
catalogueLexilla.AddLexerModule(&lmVHDL); &lmVerilog,
catalogueLexilla.AddLexerModule(&lmVisualProlog); &lmVHDL,
catalogueLexilla.AddLexerModule(&lmX12); &lmVisualProlog,
catalogueLexilla.AddLexerModule(&lmXML); &lmX12,
catalogueLexilla.AddLexerModule(&lmYAML); &lmXML,
&lmYAML,
//--Autogenerated -- end of automatically generated section //--Autogenerated -- end of automatically generated section
});
} }