summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-07-03 22:17:07 +0100
committerAndy Williams <andy@andywilliams.me>2017-07-03 22:17:07 +0100
commit8b8a43759ca2325703749d33263e3c736ec9c122 (patch)
tree10cffa49cbb9673fcd50dc341fad8e0a198e8206
parentb58629bbbef3d811700b016eb9fa97e2af71e1a1 (diff)
downloadefl-8b8a43759ca2325703749d33263e3c736ec9c122.tar.gz
elm_code: Add rust syntax
-rw-r--r--src/lib/elementary/elm_code_syntax.c14
1 files changed, 14 insertions, 0 deletions
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))