elm_code_syntax: Add c-sharp syntax highlighting.

This commit is contained in:
Alastair Poole 2020-03-06 11:03:33 +00:00
parent b554b25c4c
commit b8326b6096
1 changed files with 24 additions and 0 deletions

View File

@ -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;
}