ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8b8a43759ca2325703749d33263e3c736ec9c122

commit 8b8a43759ca2325703749d33263e3c736ec9c122
Author: Andy Williams <[email protected]>
Date:   Mon Jul 3 22:17:07 2017 +0100

    elm_code: Add rust syntax
---
 src/lib/elementary/elm_code_syntax.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/lib/elementary/elm_code_syntax.c 
b/src/lib/elementary/elm_code_syntax.c
index 5fbb415ada..27b460b7c1 100644
--- a/src/lib/elementary/elm_code_syntax.c
+++ b/src/lib/elementary/elm_code_syntax.c
@@ -29,6 +29,18 @@ static Elm_Code_Syntax _elm_code_syntax_c =
       "struct", "switch", "typedef", "union", "unsigned", "void", "volatile", 
"while", NULL}
 };
 
+static Elm_Code_Syntax _elm_code_syntax_rust =
+{
+   "-*!&+/%|^<=>:;.,{}()[]",
+   "#",
+   "//",
+   NULL,
+   NULL,
+   {"as", "break", "const", "continue", "create", "else",  "enum", "extern", 
"false", "fn", "for", "if", \
+      "impl", "in", "let", "loop", "match", "mod", "move", "mut", "pub", 
"ref", "return", "Self", "self", \
+      "static", "struct", "super", "trait", "true", "type", "unsafe", "use", 
"where", "while", NULL}
+};
+
 static Elm_Code_Syntax _elm_code_syntax_py =
 {
    "{}()[]:;%/*+!=<->,.",
@@ -70,6 +82,8 @@ elm_code_syntax_for_mime_get(const char *mime)
 
    if (!strcmp("text/x-chdr", mime) || !strcmp("text/x-csrc", mime))
      return &_elm_code_syntax_c;
+   if (!strcmp("text/rust", mime))
+     return &_elm_code_syntax_rust;
    if (!strcmp("text/x-python", mime))
      return &_elm_code_syntax_py;
    if (!strcmp("text/x-eolian", mime))

-- 


Reply via email to