diff --git a/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/covscript.cpp b/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/covscript.cpp new file mode 100644 index 000000000..e1618c9eb --- /dev/null +++ b/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/covscript.cpp @@ -0,0 +1,52 @@ +#include +#include + +namespace EE { namespace UI { namespace Doc { namespace Language { + +void addCovScript() { + + SyntaxDefinitionManager::instance()->add( + + { "CovScript", + { "%.csc$", "%.csp$", "%.ecs$" }, + { + { { "#.-\n" }, "comment" }, + { { "\"", "\"", "\\" }, "string" }, + { { "-?%.?%d+" }, "number" }, + { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" }, + { { "(import)%s+(%a+[%w/_]+)" }, { "normal", "keyword", "literal" } }, + { { "^%s*(@[A-Za-z_]%w*)%s*(%:%s*%w+%s*)$" }, { "normal", "keyword", "keyword2" } }, + { { "[%a_][%w_]*%f[(]" }, "function" }, + { { "[%a_][%w_]*" }, "symbol" }, + + }, + { + { "new", "keyword" }, { "continue", "keyword" }, { "default", "keyword" }, + { "finalize", "keyword" }, { "this", "keyword" }, { "loop", "keyword" }, + { "foreach", "keyword" }, { "namespace", "keyword" }, { "duplicate", "keyword" }, + { "end", "keyword" }, { "swap", "keyword" }, { "extends", "keyword" }, + { "range", "keyword" }, { "false", "literal" }, { "for", "keyword" }, + { "while", "keyword" }, { "null", "literal" }, { "function", "keyword" }, + { "else", "keyword" }, { "global", "keyword" }, { "struct", "keyword" }, + { "block", "keyword" }, { "break", "keyword" }, { "is", "keyword" }, + { "or", "keyword" }, { "until", "keyword" }, { "if", "keyword" }, + { "to_string", "keyword" }, { "in", "keyword" }, { "constant", "keyword" }, + { "and", "keyword" }, { "equal", "keyword" }, { "switch", "keyword" }, + { "using", "keyword" }, { "to_integer", "keyword" }, { "typeid", "keyword" }, + { "return", "keyword" }, { "var", "keyword" }, { "import", "keyword" }, + { "try", "keyword" }, { "as", "keyword" }, { "class", "keyword" }, + { "gcnew", "keyword" }, { "link", "keyword" }, { "throw", "keyword" }, + { "self", "keyword" }, { "catch", "keyword" }, { "true", "literal" }, + { "package", "keyword" }, { "override", "keyword" }, { "not", "keyword" }, + { "initialize", "keyword" }, { "local", "keyword" }, { "move", "keyword" }, + { "case", "keyword" }, { "clone", "keyword" }, { "do", "keyword" }, + { "type", "keyword" }, + + }, + "//", + { "^#!.*[ /]covscript", "^#!.*[ /]cs" } + + } ); +} + +}}}} // namespace EE::UI::Doc::Language diff --git a/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/covscript.hpp b/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/covscript.hpp new file mode 100644 index 000000000..02c70ac9f --- /dev/null +++ b/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/covscript.hpp @@ -0,0 +1,10 @@ +#ifndef EE_UI_DOC_Covscript +#define EE_UI_DOC_Covscript + +namespace EE { namespace UI { namespace Doc { namespace Language { + +extern void addCovScript(); + +}}}} // namespace EE::UI::Doc::Language + +#endif diff --git a/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languagessyntaxhighlighting.cpp b/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languagessyntaxhighlighting.cpp index 18777c0e9..ae8fa4f19 100644 --- a/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languagessyntaxhighlighting.cpp +++ b/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languagessyntaxhighlighting.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -111,6 +112,7 @@ void LanguagesSyntaxHighlighting::load() { addBuzz(); addCarbon(); addContainerFile(); + addCovScript(); addClojure(); addCMake(); addCrystal(); diff --git a/src/tools/ecode/ecode.cpp b/src/tools/ecode/ecode.cpp index 910eeeeb0..069d08b02 100644 --- a/src/tools/ecode/ecode.cpp +++ b/src/tools/ecode/ecode.cpp @@ -3540,7 +3540,7 @@ void App::init( const LogLevel& logLevel, std::string file, const Float& pidelDe mThreadPool->run( [this] { // Load language definitions Clock defClock; - SyntaxDefinitionManager::createSingleton( 114 ); + SyntaxDefinitionManager::createSingleton( 115 ); Language::LanguagesSyntaxHighlighting::load(); SyntaxDefinitionManager::instance()->setLanguageExtensionsPriority( mConfig.languagesExtensions.priorities );