summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2020-03-06 11:03:33 +0000
committerAlastair Poole <netstar@gmail.com>2020-03-06 11:04:08 +0000
commitb8326b6096f05e19c4f39c3af221996b34557bb5 (patch)
tree5962ee003d4651b79dd354728cbeff9a7db5fba2
parentb554b25c4cfd5b49d7ea8b9daf9c52977a68805e (diff)
downloadefl-b8326b6096f05e19c4f39c3af221996b34557bb5.tar.gz
elm_code_syntax: Add c-sharp syntax highlighting.
-rw-r--r--src/lib/elementary/elm_code_syntax.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_code_syntax.c b/src/lib/elementary/elm_code_syntax.c
index 856543146b..dbdf7d32f7 100644
--- a/src/lib/elementary/elm_code_syntax.c
+++ b/src/lib/elementary/elm_code_syntax.c
@@ -134,6 +134,28 @@ static Elm_Code_Syntax _elm_code_syntax_md =
{}
};
+static Elm_Code_Syntax _elm_code_syntax_csharp =
+{
+ "{}()[]:;%^/*+&|~!=<->,.",
+ ".",
+ "#",
+ "//",
+ "/*",
+ "*/",
+ _elm_code_syntax_scope_change_braces,
+ { "abstract","as","base","bool","break","byte","case","catch","char","checked", \
+ "class","const","continue","decimal","default","delegate","do","double","else","enum", \
+ "event","explicit","extern","false","finally","fixed","float","for","foreach","goto", \
+ "if","implicit","in","int","interface","internal","is","lock","long","namespace", \
+ "new","null","object","operator","out","override","params","private","protected","public", \
+ "readonly","ref","return","sbyte","sealed","short","sizeof","stackalloc","static","string", \
+ "struct","switch","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe", \
+ "ushort","using","var","virtual","void","volatile","while","add","alias","async","await", \
+ "dynamic","get","global","nameof","partial","remove","set","value","when","where","yield", \
+ "ascending","by","descending","equals","from", "group","in","into","join","let","on", \
+ "orderby","select","where","unmanaged","var", NULL }
+};
+
EAPI Elm_Code_Syntax *
elm_code_syntax_for_mime_get(const char *mime)
{
@@ -151,6 +173,8 @@ elm_code_syntax_for_mime_get(const char *mime)
return &_elm_code_syntax_md;
if (!strcmp("text/x-go", mime))
return &_elm_code_syntax_go;
+ if (!strcmp("text/x-csharp", mime))
+ return &_elm_code_syntax_csharp;
return NULL;
}