mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-11 17:17:42 +03:00
Add CMakeCache.txt syntax highlighting (SpartanJ/ecode#562).
Register .dlg extension (SpartanJ/ecode#521).
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
#include <eepp/ui/doc/languages/cmakecache.hpp>
|
||||
#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
|
||||
|
||||
namespace EE { namespace UI { namespace Doc { namespace Language {
|
||||
|
||||
SyntaxDefinition& addCMakeCache() {
|
||||
|
||||
return SyntaxDefinitionManager::instance()->add(
|
||||
|
||||
{ "CMakeCache",
|
||||
{ "^CMakeCache.txt$" },
|
||||
{
|
||||
{ { "//+.*$|#+.*$" }, "comment", "", SyntaxPatternMatchType::RegEx },
|
||||
{ { "\\b-ADVANCED\\b" }, "keyword", "", SyntaxPatternMatchType::RegEx },
|
||||
{ { "%f[^=].*" }, "string" },
|
||||
{ { "\\b(?i:(YES|NO|ON|OFF|TRUE|FALSE|Y|N|\\d+))$" },
|
||||
"literal",
|
||||
"",
|
||||
SyntaxPatternMatchType::RegEx },
|
||||
{ { "\\b(?i:([.\\w_-]+))\\b" }, "parameter", "", SyntaxPatternMatchType::RegEx },
|
||||
{ { "(:)(BOOL|STRING|FILEPATH|PATH|STATIC|INTERNAL)(=)" },
|
||||
{ "operator", "type", "operator" },
|
||||
{},
|
||||
"",
|
||||
SyntaxPatternMatchType::RegEx },
|
||||
|
||||
},
|
||||
{
|
||||
|
||||
},
|
||||
"",
|
||||
{}
|
||||
|
||||
} );
|
||||
}
|
||||
|
||||
}}}} // namespace EE::UI::Doc::Language
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef EE_UI_DOC_Cmakecache
|
||||
#define EE_UI_DOC_Cmakecache
|
||||
#include <eepp/ui/doc/syntaxdefinition.hpp>
|
||||
|
||||
namespace EE { namespace UI { namespace Doc { namespace Language {
|
||||
|
||||
extern SyntaxDefinition& addCMakeCache();
|
||||
|
||||
}}}} // namespace EE::UI::Doc::Language
|
||||
|
||||
#endif
|
||||
@@ -9,7 +9,7 @@ SyntaxDefinition& addRcscript() {
|
||||
->add(
|
||||
|
||||
{ "RC Script",
|
||||
{ "%.rc$", "%.rc2$" },
|
||||
{ "%.rc$", "%.rc2$", "%.dlg$" },
|
||||
{
|
||||
{ { "include", "#comments" },
|
||||
{ "normal" },
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <eepp/ui/doc/languages/carbon.hpp>
|
||||
#include <eepp/ui/doc/languages/clojure.hpp>
|
||||
#include <eepp/ui/doc/languages/cmake.hpp>
|
||||
#include <eepp/ui/doc/languages/cmakecache.hpp>
|
||||
#include <eepp/ui/doc/languages/containerfile.hpp>
|
||||
#include <eepp/ui/doc/languages/covscript.hpp>
|
||||
#include <eepp/ui/doc/languages/crystal.hpp>
|
||||
@@ -221,6 +222,10 @@ void LanguagesSyntaxHighlighting::load() {
|
||||
|
||||
} );
|
||||
|
||||
sdm->addPreDefinition( { "CMakeCache",
|
||||
[]() -> SyntaxDefinition& { return addCMakeCache(); },
|
||||
{ "^CMakeCache.txt$" } } );
|
||||
|
||||
sdm->addPreDefinition( {
|
||||
"Crystal",
|
||||
[]() -> SyntaxDefinition& { return addCrystal(); },
|
||||
@@ -561,7 +566,7 @@ void LanguagesSyntaxHighlighting::load() {
|
||||
|
||||
sdm->addPreDefinition( { "RC Script",
|
||||
[]() -> SyntaxDefinition& { return addRcscript(); },
|
||||
{ "%.rc$", "%.rc2$" } } );
|
||||
{ "%.rc$", "%.rc2$", "%.dlg$" } } );
|
||||
|
||||
sdm->addPreDefinition(
|
||||
{ "Rave", []() -> SyntaxDefinition& { return addRave(); }, { "%.rave$" } } );
|
||||
|
||||
Reference in New Issue
Block a user