Repository: SpartanJ/eepp
Pull request #101: "Ü" programming language syntax highlighting
Author: login: ghost
Created: 2025-03-31T03:37:22Z | Merged: 2025-03-31T20:26:03Z

Fix https://github.com/SpartanJ/ecode/issues/420


Diff:
diff --git a/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp b/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
new file mode 100644
index 000000000..ef31c8693
--- /dev/null
+++ b/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
@@ -0,0 +1,167 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "Ü",
+		  { "%.u$", "%.uh$" },
+		  {
+			  { { "//.-\n" }, "comment" },
+			  { { "/%*", "%*/" }, "comment" },
+			  { { "\"", "[\"\n]", "\\" }, "string" },
+			  { { "'", "'", "\\" }, "string" },
+			  { { "^%s*(import)%s+([<%\"][%w%d%.%\\%/%_%-]+[>%\"])" },
+				{ "keyword", "keyword", "literal" } },
+			  { { "cpp_number_parser" }, "number", "", SyntaxPatternMatchType::Parser },
+			  { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" },
+			  { { "[%a_][%w_]*%f[(]" }, "function" },
+			  { { "ust%:%:[%w_]*" }, "keyword2" },
+			  { { "[%a_][%w_]*" }, "symbol" },
+
+		  },
+		  {
+			  { "fn", "keyword" },
+			  { "op", "keyword" },
+			  { "var", "keyword" },
+			  { "auto", "keyword" },
+			  { "return", "keyword" },
+			  { "yield", "keyword" },
+			  { "label", "keyword" },
+			  { "while", "keyword" },
+			  { "loop", "keyword" },
+			  { "break", "keyword" },
+			  { "continue", "keyword" },
+			  { "if", "keyword" },
+			  { "static_if", "keyword" },
+			  { "enable_if", "keyword" },
+			  { "if_coro_advance", "keyword" },
+			  { "else", "keyword" },
+			  { "move", "keyword" },
+			  { "take", "keyword" },
+			  { "byval", "keyword" },
+			  { "tup", "keyword" },
+			  { "struct", "keyword" },
+			  { "class", "keyword" },
+			  { "final", "keyword" },
+			  { "polymorph", "keyword" },
+			  { "interface", "keyword" },
+			  { "abstract", "keyword" },
+			  { "non_sync", "keyword" },
+			  { "ordered", "keyword" },
+			  { "nodiscard", "keyword" },
+			  { "nomangle", "keyword" },
+			  { "call_conv", "keyword" },
+			  { "virtual", "keyword" },
+			  { "override", "keyword" },
+			  { "pure", "keyword" },
+			  { "generator", "keyword" },
+			  { "async", "keyword" },
+			  { "await", "keyword" },
+			  { "namespace", "keyword" },
+			  { "public", "keyword" },
+			  { "private", "keyword" },
+			  { "protected", "keyword" },
+			  { "true", "literal" },
+			  { "false", "literal" },
+			  { "mut", "keyword" },
+			  { "imut", "keyword" },
+			  { "constexpr", "keyword" },
+			  { "const", "keyword" },
+			  { "zero_init", "keyword" },
+			  { "this", "keyword" },
+			  { "base", "keyword" },
+			  { "constructor", "keyword" },
+			  { "destructor", "keyword" },
+			  { "conversion_constructor", "keyword" },
+			  { "static_assert", "keyword" },
+			  { "halt", "keyword" },
+			  { "safe", "keyword" },
+			  { "type", "keyword" },
+			  { "typeinfo", "keyword" },
+			  { "same_type", "keyword" },
+			  { "typeof", "keyword" },
+			  { "template", "keyword" },
+			  { "enum", "keyword" },
+			  { "cast_ref", "keyword" },
+			  { "cast_imut", "keyword" },
+			  { "alloca", "keyword" },
+			  { "as", "keyword" },
+			  { "is", "keyword" },
+			  { "import", "keyword" },
+			  { "export", "keyword" },
+			  { "embed", "keyword" },
+			  { "default", "keyword" },
+			  { "delete", "keyword" },
+			  { "for", "keyword" },
+			  { "with", "keyword" },
+			  { "do", "keyword" },
+			  { "switch", "keyword" },
+			  { "case", "keyword" },
+			  { "typename", "keyword" },
+			  { "lambda", "keyword" },
+			  { "static", "keyword" },
+			  { "package", "keyword" },
+			  { "module", "keyword" },
+			  { "mixin", "keyword" },
+			  { "thread_local", "keyword" },
+			  { "unsafe", "keyword" },
+			  { "cast_ref_unsafe", "keyword" },
+			  { "cast_mut", "keyword" },
+			  { "uninitialized", "keyword" },
+			  { "void", "keyword2" },
+			  { "bool", "keyword2" },
+			  { "i8", "keyword2" },
+			  { "u8", "keyword2" },
+			  { "i16", "keyword2" },
+			  { "u16", "keyword2" },
+			  { "i32", "keyword2" },
+			  { "u32", "keyword2" },
+			  { "i64", "keyword2" },
+			  { "u64", "keyword2" },
+			  { "i128", "keyword2" },
+			  { "u128", "keyword2" },
+			  { "i256", "keyword2" },
+			  { "u256", "keyword2" },
+			  { "i512", "keyword2" },
+			  { "u512", "keyword2" },
+			  { "i1024", "keyword2" },
+			  { "u1024", "keyword2" },
+			  { "i2048", "keyword2" },
+			  { "u2048", "keyword2" },
+			  { "i4096", "keyword2" },
+			  { "u4096", "keyword2" },
+			  { "f16", "keyword2" },
+			  { "f32", "keyword2" },
+			  { "f80", "keyword2" },
+			  { "f64", "keyword2" },
+			  { "f128", "keyword2" },
+			  { "char8", "keyword2" },
+			  { "char16", "keyword2" },
+			  { "char32", "keyword2" },
+			  { "byte8", "keyword2" },
+			  { "byte16", "keyword2" },
+			  { "byte32", "keyword2" },
+			  { "byte64", "keyword2" },
+			  { "byte128", "keyword2" },
+			  { "byte256", "keyword2" },
+			  { "byte512", "keyword2" },
+			  { "byte1024", "keyword2" },
+			  { "byte2048", "keyword2" },
+			  { "byte4096", "keyword2" },
+			  { "size_type", "keyword2" },
+			  { "ssize_type", "keyword2" }
+		  },
+		  "//",
+		  {},
+		  "u" } );
+
+	sd.setFoldRangeType( FoldRangeType::Braces ).setFoldBraces( { { '{', '}' } } );
+}
+
+}}}} // namespace EE::UI::Doc::Language
diff --git a/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.hpp b/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.hpp
new file mode 100644
index 000000000..0c14c09bb
--- /dev/null
+++ b/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.hpp
@@ -0,0 +1,10 @@
+#ifndef EE_UI_DOC_U
+#define EE_UI_DOC_U
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+extern void addU();
+
+}}}} // 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 3a1772f65..f589a3eef 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
@@ -84,6 +84,7 @@
 #include <eepp/ui/doc/languages/teal.hpp>
 #include <eepp/ui/doc/languages/toml.hpp>
 #include <eepp/ui/doc/languages/typescript.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
 #include <eepp/ui/doc/languages/v.hpp>
 #include <eepp/ui/doc/languages/v1.hpp>
 #include <eepp/ui/doc/languages/vala.hpp>
@@ -188,6 +189,7 @@ void LanguagesSyntaxHighlighting::load() {
 	addTeal();
 	addToml();
 	addTypeScript();
+	addU();
 	addV();
 	addV1();
 	addVala();


Reviews:
user: login: SpartanJ
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-31T04:19:39Z
user: login: SpartanJ
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-31T04:20:23Z
user: login: SpartanJ
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-31T04:22:44Z
user: login: SpartanJ
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-31T04:24:43Z
user: login: SpartanJ
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-31T04:25:18Z
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-31T05:58:21Z
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-31T05:58:55Z
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-31T06:00:10Z
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-31T06:24:04Z
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-31T06:26:46Z
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-31T06:27:26Z
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-31T06:28:41Z
user: login: SpartanJ
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-31T13:57:58Z
user: login: SpartanJ
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-31T13:58:24Z
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-31T15:57:41Z
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-31T16:00:30Z

Review comments:
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
+		  { "%.u$", "%.uh$" },
+		  {
+			  { { "R%\"(xml)%(", "%)(xml)%\"" }, { "string", "keyword2", "keyword2" }, "XML" },
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
user: login: SpartanJ
body: I understand that you're just copying the definitions of other languages and replacing the symbols, but this is not gonna work if you don't read the languages documentation, because I will have to do it to verify that any of these rules make sense. Here none of the multi-line string rules have anything to do for Ü, [documentation](https://panzerschrek.github.io/U-00DC-Sprache-site/docs/en/string_literals.html) does not mention multi-line strings anywhere, it's not supported. All the "R..." patterns are invalid.
created_at: 2025-03-31T04:19:39Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
+		  { "%.u$", "%.uh$" },
+		  {
+			  { { "R%\"(xml)%(", "%)(xml)%\"" }, { "string", "keyword2", "keyword2" }, "XML" },
+			  { { "R%\"(css)%(", "%)(css)%\"" }, { "string", "keyword2", "keyword2" }, "CSS" },
+			  { { "R%\"(html)%(", "%)(html)%\"" }, { "string", "keyword2", "keyword2" }, "HTML" },
+			  { { "R%\"(json)%(", "%)(json)%\"" }, { "string", "keyword2", "keyword2" }, "JSON" },
+			  { { "R\"[%a-\"]+%(", "%)[%a-\"]+%\"" }, "string" },
+			  { { "R\"%(", "%)\"" }, "string" },
+			  { { "//.-\n" }, "comment" },
+			  { { "/%*", "%*/" }, "comment" },
+			  { { "\"", "[\"\n]", "\\" }, "string" },
+			  { { "'", "'", "\\" }, "string" },
+			  { { "^%s*(import)%s+([<%\"][%w%d%.%\\%/%_%-]+[>%\"])" },
+				{ "keyword", "keyword", "literal" } },
+			  { { "cpp_number_parser" }, "number", "", SyntaxPatternMatchType::Parser },
+			  { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" },
+			  { { "[%a_][%w_]*%f[(]" }, "function" },
+			  { { "pretty_main" }, "function" },
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
user: login: SpartanJ
body: This goes to symbols.
created_at: 2025-03-31T04:20:23Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
+		  { "%.u$", "%.uh$" },
+		  {
+			  { { "R%\"(xml)%(", "%)(xml)%\"" }, { "string", "keyword2", "keyword2" }, "XML" },
+			  { { "R%\"(css)%(", "%)(css)%\"" }, { "string", "keyword2", "keyword2" }, "CSS" },
+			  { { "R%\"(html)%(", "%)(html)%\"" }, { "string", "keyword2", "keyword2" }, "HTML" },
+			  { { "R%\"(json)%(", "%)(json)%\"" }, { "string", "keyword2", "keyword2" }, "JSON" },
+			  { { "R\"[%a-\"]+%(", "%)[%a-\"]+%\"" }, "string" },
+			  { { "R\"%(", "%)\"" }, "string" },
+			  { { "//.-\n" }, "comment" },
+			  { { "/%*", "%*/" }, "comment" },
+			  { { "\"", "[\"\n]", "\\" }, "string" },
+			  { { "'", "'", "\\" }, "string" },
+			  { { "^%s*(import)%s+([<%\"][%w%d%.%\\%/%_%-]+[>%\"])" },
+				{ "keyword", "keyword", "literal" } },
+			  { { "cpp_number_parser" }, "number", "", SyntaxPatternMatchType::Parser },
+			  { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" },
+			  { { "[%a_][%w_]*%f[(]" }, "function" },
+			  { { "pretty_main" }, "function" },
+			  { { "ust%:%:[%w_]*" }, "keyword2" },
+			  { { "(%[)(%[)(%a[%w_]+)(%])(%])" },
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
user: login: SpartanJ
body: This does not exists in Ü. They just use [keywords](https://panzerschrek.github.io/U-00DC-Sprache-site/docs/en/nodiscard.html).
created_at: 2025-03-31T04:22:44Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
+		  { "%.u$", "%.uh$" },
+		  {
+			  { { "R%\"(xml)%(", "%)(xml)%\"" }, { "string", "keyword2", "keyword2" }, "XML" },
+			  { { "R%\"(css)%(", "%)(css)%\"" }, { "string", "keyword2", "keyword2" }, "CSS" },
+			  { { "R%\"(html)%(", "%)(html)%\"" }, { "string", "keyword2", "keyword2" }, "HTML" },
+			  { { "R%\"(json)%(", "%)(json)%\"" }, { "string", "keyword2", "keyword2" }, "JSON" },
+			  { { "R\"[%a-\"]+%(", "%)[%a-\"]+%\"" }, "string" },
+			  { { "R\"%(", "%)\"" }, "string" },
+			  { { "//.-\n" }, "comment" },
+			  { { "/%*", "%*/" }, "comment" },
+			  { { "\"", "[\"\n]", "\\" }, "string" },
+			  { { "'", "'", "\\" }, "string" },
+			  { { "^%s*(import)%s+([<%\"][%w%d%.%\\%/%_%-]+[>%\"])" },
+				{ "keyword", "keyword", "literal" } },
+			  { { "cpp_number_parser" }, "number", "", SyntaxPatternMatchType::Parser },
+			  { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" },
+			  { { "[%a_][%w_]*%f[(]" }, "function" },
+			  { { "pretty_main" }, "function" },
+			  { { "ust%:%:[%w_]*" }, "keyword2" },
+			  { { "(%[)(%[)(%a[%w_]+)(%])(%])" },
+				{ "normal", "keyword", "keyword3", "keyword2", "keyword3", "keyword" } },
+			  { { "^%s*#[%a_][%w_]*" }, "symbol" },
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
user: login: SpartanJ
body: This one does not seem valid either.
created_at: 2025-03-31T04:24:42Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
user: login: SpartanJ
body: Ü
created_at: 2025-03-31T04:25:17Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
+		  { "%.u$", "%.uh$" },
+		  {
+			  { { "R%\"(xml)%(", "%)(xml)%\"" }, { "string", "keyword2", "keyword2" }, "XML" },
+			  { { "R%\"(css)%(", "%)(css)%\"" }, { "string", "keyword2", "keyword2" }, "CSS" },
+			  { { "R%\"(html)%(", "%)(html)%\"" }, { "string", "keyword2", "keyword2" }, "HTML" },
+			  { { "R%\"(json)%(", "%)(json)%\"" }, { "string", "keyword2", "keyword2" }, "JSON" },
+			  { { "R\"[%a-\"]+%(", "%)[%a-\"]+%\"" }, "string" },
+			  { { "R\"%(", "%)\"" }, "string" },
+			  { { "//.-\n" }, "comment" },
+			  { { "/%*", "%*/" }, "comment" },
+			  { { "\"", "[\"\n]", "\\" }, "string" },
+			  { { "'", "'", "\\" }, "string" },
+			  { { "^%s*(import)%s+([<%\"][%w%d%.%\\%/%_%-]+[>%\"])" },
+				{ "keyword", "keyword", "literal" } },
+			  { { "cpp_number_parser" }, "number", "", SyntaxPatternMatchType::Parser },
+			  { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" },
+			  { { "[%a_][%w_]*%f[(]" }, "function" },
+			  { { "pretty_main" }, "function" },
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
body: What do you mean? `pretty_main`?
created_at: 2025-03-31T05:58:21Z
author_association: NONE
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
+		  { "%.u$", "%.uh$" },
+		  {
+			  { { "R%\"(xml)%(", "%)(xml)%\"" }, { "string", "keyword2", "keyword2" }, "XML" },
+			  { { "R%\"(css)%(", "%)(css)%\"" }, { "string", "keyword2", "keyword2" }, "CSS" },
+			  { { "R%\"(html)%(", "%)(html)%\"" }, { "string", "keyword2", "keyword2" }, "HTML" },
+			  { { "R%\"(json)%(", "%)(json)%\"" }, { "string", "keyword2", "keyword2" }, "JSON" },
+			  { { "R\"[%a-\"]+%(", "%)[%a-\"]+%\"" }, "string" },
+			  { { "R\"%(", "%)\"" }, "string" },
+			  { { "//.-\n" }, "comment" },
+			  { { "/%*", "%*/" }, "comment" },
+			  { { "\"", "[\"\n]", "\\" }, "string" },
+			  { { "'", "'", "\\" }, "string" },
+			  { { "^%s*(import)%s+([<%\"][%w%d%.%\\%/%_%-]+[>%\"])" },
+				{ "keyword", "keyword", "literal" } },
+			  { { "cpp_number_parser" }, "number", "", SyntaxPatternMatchType::Parser },
+			  { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" },
+			  { { "[%a_][%w_]*%f[(]" }, "function" },
+			  { { "pretty_main" }, "function" },
+			  { { "ust%:%:[%w_]*" }, "keyword2" },
+			  { { "(%[)(%[)(%a[%w_]+)(%])(%])" },
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
body: You mean this rule?

```
			  { { "(%[)(%[)(%a[%w_]+)(%])(%])" },
				{ "normal", "keyword", "keyword3", "keyword2", "keyword3", "keyword" } },
```
created_at: 2025-03-31T05:58:55Z
author_association: NONE
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
body: But `Ü` is Unicode.
created_at: 2025-03-31T06:00:10Z
author_association: NONE
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
+		  { "%.u$", "%.uh$" },
+		  {
+			  { { "R%\"(xml)%(", "%)(xml)%\"" }, { "string", "keyword2", "keyword2" }, "XML" },
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
body: I have removed all of the "R..." patterns.
created_at: 2025-03-31T06:24:04Z
author_association: NONE
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
+		  { "%.u$", "%.uh$" },
+		  {
+			  { { "R%\"(xml)%(", "%)(xml)%\"" }, { "string", "keyword2", "keyword2" }, "XML" },
+			  { { "R%\"(css)%(", "%)(css)%\"" }, { "string", "keyword2", "keyword2" }, "CSS" },
+			  { { "R%\"(html)%(", "%)(html)%\"" }, { "string", "keyword2", "keyword2" }, "HTML" },
+			  { { "R%\"(json)%(", "%)(json)%\"" }, { "string", "keyword2", "keyword2" }, "JSON" },
+			  { { "R\"[%a-\"]+%(", "%)[%a-\"]+%\"" }, "string" },
+			  { { "R\"%(", "%)\"" }, "string" },
+			  { { "//.-\n" }, "comment" },
+			  { { "/%*", "%*/" }, "comment" },
+			  { { "\"", "[\"\n]", "\\" }, "string" },
+			  { { "'", "'", "\\" }, "string" },
+			  { { "^%s*(import)%s+([<%\"][%w%d%.%\\%/%_%-]+[>%\"])" },
+				{ "keyword", "keyword", "literal" } },
+			  { { "cpp_number_parser" }, "number", "", SyntaxPatternMatchType::Parser },
+			  { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" },
+			  { { "[%a_][%w_]*%f[(]" }, "function" },
+			  { { "pretty_main" }, "function" },
+			  { { "ust%:%:[%w_]*" }, "keyword2" },
+			  { { "(%[)(%[)(%a[%w_]+)(%])(%])" },
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
body: I have removed the rules for C++ attribute specifier sequences as you said.
created_at: 2025-03-31T06:26:46Z
author_association: NONE
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
body: Done.
created_at: 2025-03-31T06:27:26Z
author_association: NONE
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
+		  { "%.u$", "%.uh$" },
+		  {
+			  { { "R%\"(xml)%(", "%)(xml)%\"" }, { "string", "keyword2", "keyword2" }, "XML" },
+			  { { "R%\"(css)%(", "%)(css)%\"" }, { "string", "keyword2", "keyword2" }, "CSS" },
+			  { { "R%\"(html)%(", "%)(html)%\"" }, { "string", "keyword2", "keyword2" }, "HTML" },
+			  { { "R%\"(json)%(", "%)(json)%\"" }, { "string", "keyword2", "keyword2" }, "JSON" },
+			  { { "R\"[%a-\"]+%(", "%)[%a-\"]+%\"" }, "string" },
+			  { { "R\"%(", "%)\"" }, "string" },
+			  { { "//.-\n" }, "comment" },
+			  { { "/%*", "%*/" }, "comment" },
+			  { { "\"", "[\"\n]", "\\" }, "string" },
+			  { { "'", "'", "\\" }, "string" },
+			  { { "^%s*(import)%s+([<%\"][%w%d%.%\\%/%_%-]+[>%\"])" },
+				{ "keyword", "keyword", "literal" } },
+			  { { "cpp_number_parser" }, "number", "", SyntaxPatternMatchType::Parser },
+			  { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" },
+			  { { "[%a_][%w_]*%f[(]" }, "function" },
+			  { { "pretty_main" }, "function" },
+			  { { "ust%:%:[%w_]*" }, "keyword2" },
+			  { { "(%[)(%[)(%a[%w_]+)(%])(%])" },
+				{ "normal", "keyword", "keyword3", "keyword2", "keyword3", "keyword" } },
+			  { { "^%s*#[%a_][%w_]*" }, "symbol" },
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
body: Which one? Ü's `ust` is equivalent to C++'s `std` namespace.
created_at: 2025-03-31T06:28:41Z
author_association: NONE
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
+		  { "%.u$", "%.uh$" },
+		  {
+			  { { "R%\"(xml)%(", "%)(xml)%\"" }, { "string", "keyword2", "keyword2" }, "XML" },
+			  { { "R%\"(css)%(", "%)(css)%\"" }, { "string", "keyword2", "keyword2" }, "CSS" },
+			  { { "R%\"(html)%(", "%)(html)%\"" }, { "string", "keyword2", "keyword2" }, "HTML" },
+			  { { "R%\"(json)%(", "%)(json)%\"" }, { "string", "keyword2", "keyword2" }, "JSON" },
+			  { { "R\"[%a-\"]+%(", "%)[%a-\"]+%\"" }, "string" },
+			  { { "R\"%(", "%)\"" }, "string" },
+			  { { "//.-\n" }, "comment" },
+			  { { "/%*", "%*/" }, "comment" },
+			  { { "\"", "[\"\n]", "\\" }, "string" },
+			  { { "'", "'", "\\" }, "string" },
+			  { { "^%s*(import)%s+([<%\"][%w%d%.%\\%/%_%-]+[>%\"])" },
+				{ "keyword", "keyword", "literal" } },
+			  { { "cpp_number_parser" }, "number", "", SyntaxPatternMatchType::Parser },
+			  { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" },
+			  { { "[%a_][%w_]*%f[(]" }, "function" },
+			  { { "pretty_main" }, "function" },
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
user: login: SpartanJ
body: Yes, comments are always over the _offending_ line. `pretty_main` must go to symbols. There's no reason to have as a separate pattern.
created_at: 2025-03-31T13:57:58Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
+		  { "%.u$", "%.uh$" },
+		  {
+			  { { "R%\"(xml)%(", "%)(xml)%\"" }, { "string", "keyword2", "keyword2" }, "XML" },
+			  { { "R%\"(css)%(", "%)(css)%\"" }, { "string", "keyword2", "keyword2" }, "CSS" },
+			  { { "R%\"(html)%(", "%)(html)%\"" }, { "string", "keyword2", "keyword2" }, "HTML" },
+			  { { "R%\"(json)%(", "%)(json)%\"" }, { "string", "keyword2", "keyword2" }, "JSON" },
+			  { { "R\"[%a-\"]+%(", "%)[%a-\"]+%\"" }, "string" },
+			  { { "R\"%(", "%)\"" }, "string" },
+			  { { "//.-\n" }, "comment" },
+			  { { "/%*", "%*/" }, "comment" },
+			  { { "\"", "[\"\n]", "\\" }, "string" },
+			  { { "'", "'", "\\" }, "string" },
+			  { { "^%s*(import)%s+([<%\"][%w%d%.%\\%/%_%-]+[>%\"])" },
+				{ "keyword", "keyword", "literal" } },
+			  { { "cpp_number_parser" }, "number", "", SyntaxPatternMatchType::Parser },
+			  { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" },
+			  { { "[%a_][%w_]*%f[(]" }, "function" },
+			  { { "pretty_main" }, "function" },
+			  { { "ust%:%:[%w_]*" }, "keyword2" },
+			  { { "(%[)(%[)(%a[%w_]+)(%])(%])" },
+				{ "normal", "keyword", "keyword3", "keyword2", "keyword3", "keyword" } },
+			  { { "^%s*#[%a_][%w_]*" }, "symbol" },
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
user: login: SpartanJ
body: No, line `26`, `"^%s*#[%a_][%w_]*"` pattern.
created_at: 2025-03-31T13:58:24Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
+		  { "%.u$", "%.uh$" },
+		  {
+			  { { "R%\"(xml)%(", "%)(xml)%\"" }, { "string", "keyword2", "keyword2" }, "XML" },
+			  { { "R%\"(css)%(", "%)(css)%\"" }, { "string", "keyword2", "keyword2" }, "CSS" },
+			  { { "R%\"(html)%(", "%)(html)%\"" }, { "string", "keyword2", "keyword2" }, "HTML" },
+			  { { "R%\"(json)%(", "%)(json)%\"" }, { "string", "keyword2", "keyword2" }, "JSON" },
+			  { { "R\"[%a-\"]+%(", "%)[%a-\"]+%\"" }, "string" },
+			  { { "R\"%(", "%)\"" }, "string" },
+			  { { "//.-\n" }, "comment" },
+			  { { "/%*", "%*/" }, "comment" },
+			  { { "\"", "[\"\n]", "\\" }, "string" },
+			  { { "'", "'", "\\" }, "string" },
+			  { { "^%s*(import)%s+([<%\"][%w%d%.%\\%/%_%-]+[>%\"])" },
+				{ "keyword", "keyword", "literal" } },
+			  { { "cpp_number_parser" }, "number", "", SyntaxPatternMatchType::Parser },
+			  { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" },
+			  { { "[%a_][%w_]*%f[(]" }, "function" },
+			  { { "pretty_main" }, "function" },
+			  { { "ust%:%:[%w_]*" }, "keyword2" },
+			  { { "(%[)(%[)(%a[%w_]+)(%])(%])" },
+				{ "normal", "keyword", "keyword3", "keyword2", "keyword3", "keyword" } },
+			  { { "^%s*#[%a_][%w_]*" }, "symbol" },
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
body: I got it. Ü uses a different syntax for macros than C++:

https://panzerschrek.github.io/U-00DC-Sprache-site/docs/en/macros.html

But I don't think I can cover it. I will remove the remnant of C++ macros though. Thank you for pointing this out.
created_at: 2025-03-31T15:57:41Z
author_association: NONE
diff_hunk: @@ -0,0 +1,177 @@
+#include <eepp/system/parsermatcher.hpp>
+#include <eepp/ui/doc/languages/u.hpp>
+#include <eepp/ui/doc/syntaxdefinitionmanager.hpp>
+
+namespace EE { namespace UI { namespace Doc { namespace Language {
+
+void addU() {
+	ParserMatcherManager::instance()->registerBaseParsers();
+
+	auto& sd = SyntaxDefinitionManager::instance()->add(
+
+		{ "U",
+		  { "%.u$", "%.uh$" },
+		  {
+			  { { "R%\"(xml)%(", "%)(xml)%\"" }, { "string", "keyword2", "keyword2" }, "XML" },
+			  { { "R%\"(css)%(", "%)(css)%\"" }, { "string", "keyword2", "keyword2" }, "CSS" },
+			  { { "R%\"(html)%(", "%)(html)%\"" }, { "string", "keyword2", "keyword2" }, "HTML" },
+			  { { "R%\"(json)%(", "%)(json)%\"" }, { "string", "keyword2", "keyword2" }, "JSON" },
+			  { { "R\"[%a-\"]+%(", "%)[%a-\"]+%\"" }, "string" },
+			  { { "R\"%(", "%)\"" }, "string" },
+			  { { "//.-\n" }, "comment" },
+			  { { "/%*", "%*/" }, "comment" },
+			  { { "\"", "[\"\n]", "\\" }, "string" },
+			  { { "'", "'", "\\" }, "string" },
+			  { { "^%s*(import)%s+([<%\"][%w%d%.%\\%/%_%-]+[>%\"])" },
+				{ "keyword", "keyword", "literal" } },
+			  { { "cpp_number_parser" }, "number", "", SyntaxPatternMatchType::Parser },
+			  { { "[%+%-=/%*%^%%<>!~|&]" }, "operator" },
+			  { { "[%a_][%w_]*%f[(]" }, "function" },
+			  { { "pretty_main" }, "function" },
path: src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/u.cpp
body: I think `pretty_main` should be considered as `main`. I put it here intentionally. You can think of it as a macro for quickly defining a `main` function. But I will follow your suggestion.
created_at: 2025-03-31T16:00:29Z
author_association: NONE

PR comments:
user: login: ghost
created_at: 2025-03-31T20:17:25Z
body: @SpartanJ Please have a look if you can stash the commits and merge this PR. Thank you.
author_association: NONE
user: login: SpartanJ
created_at: 2025-03-31T20:23:26Z
body: @Curculigo Don't worry, I changed during the last weekend the default merge option in PRs to "Squash and merge", PRs are always going to be merged as a single commit into develop from now on.
author_association: OWNER
user: login: SpartanJ
created_at: 2025-03-31T20:26:00Z
body: This has pending to grow the number of languages in `SyntaxDefinitionManager::createSingleton( 119 );` (this exists just to pre-allocate memory for the languages, it's just a micro-optimization). You changed it but I added Lisp support yesterday so I *used* that slot. Anyway, I'll add it later and merge now.
author_association: OWNER