From: Al Poole Date: Sat, 11 Nov 2017 13:23:12 +0000 (+0000) Subject: elm_code: add support for go syntax. X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~1747 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42484606d0e1fbc5a36bf7a65ae7e5486e288508;p=platform%2Fupstream%2Fefl.git elm_code: add support for go syntax. --- diff --git a/src/lib/elementary/elm_code_syntax.c b/src/lib/elementary/elm_code_syntax.c index e6542f7..2cef6c3 100644 --- a/src/lib/elementary/elm_code_syntax.c +++ b/src/lib/elementary/elm_code_syntax.c @@ -80,6 +80,22 @@ 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 = { "()[]*+-_=#.>!:\\`~|", @@ -106,6 +122,8 @@ elm_code_syntax_for_mime_get(const char *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; }