diff options
author | Al Poole <netstar@gmail.com> | 2017-11-11 13:23:12 +0000 |
---|---|---|
committer | Andy Williams <andy@andywilliams.me> | 2018-02-10 21:55:13 +0000 |
commit | 073ecdbea0788ee975f6dc54f107c47b1796f640 (patch) | |
tree | e7217c85564a88b148fe5ec1ad56cf89c80e8e4f | |
parent | 9db0d1f949ae7757f1c086e1d8ec2593afd2c78e (diff) | |
download | efl-073ecdbea0788ee975f6dc54f107c47b1796f640.tar.gz |
elm_code: add support for go and markdown syntax.
-rw-r--r-- | src/lib/elementary/elm_code_syntax.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_code_syntax.c b/src/lib/elementary/elm_code_syntax.c index 45647cacea..1a567fc250 100644 --- a/src/lib/elementary/elm_code_syntax.c +++ b/src/lib/elementary/elm_code_syntax.c @@ -80,6 +80,32 @@ static Elm_Code_Syntax _elm_code_syntax_eo = "implements", "constructors", "get", "set", "keys", "values", "true", "false", "null"} }; +static Elm_Code_Syntax _elm_code_syntax_go = +{ + "{}()[]:;%^/*+&|~!=<->,.", + ".", + NULL, + "//", + "/*", + "*/", + { "break", "case", "chan", "const", "default", "defer", "else", "fallthrough", "for", "func", "go", "goto", \ + "if", "import", "interface", "map", "package", "range", "return", "select", "struct", "switch", "type", "var", \ + "true", "false", "iota", "nil", \ + "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", "float32", \ + "float64", "complex64", "complex128", "bool", "byte", "rune", "string", "error", "make", "len", "cap", "new", "append", \ + "copy", "close", "delete", "complex", "real", "imag", "panic", "recover", NULL } +}; + +static Elm_Code_Syntax _elm_code_syntax_md = +{ + "()[]*+-_=#.>!:\\`~|", + "", + NULL, + NULL, + "<!--", + "-->", + {} +}; EAPI Elm_Code_Syntax * elm_code_syntax_for_mime_get(const char *mime) @@ -94,6 +120,10 @@ elm_code_syntax_for_mime_get(const char *mime) return &_elm_code_syntax_py; if (!strcmp("text/x-eolian", mime)) return &_elm_code_syntax_eo; + if (!strcmp("text/markdown", mime)) + return &_elm_code_syntax_md; + if (!strcmp("text/x-go", mime)) + return &_elm_code_syntax_go; return NULL; } |