summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAl Poole <netstar@gmail.com>2017-11-11 13:23:12 +0000
committerAl Poole <netstar@gmail.com>2017-11-11 13:23:12 +0000
commit42484606d0e1fbc5a36bf7a65ae7e5486e288508 (patch)
tree97cc9953b13e74e57d1ec1af8be5a35e2a6bd37f /src
parent75daddc83999403c74cab7b1ed1f8fc3405fd025 (diff)
elm_code: add support for go syntax.
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/elm_code_syntax.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_code_syntax.c b/src/lib/elementary/elm_code_syntax.c
index e6542f7aac..2cef6c33a2 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 =
80 "implements", "constructors", "get", "set", "keys", "values", "true", "false", "null"} 80 "implements", "constructors", "get", "set", "keys", "values", "true", "false", "null"}
81}; 81};
82 82
83static Elm_Code_Syntax _elm_code_syntax_go =
84{
85 "{}()[]:;%^/*+&|~!=<->,.",
86 ".",
87 NULL,
88 "//",
89 "/*",
90 "*/",
91 { "break", "case", "chan", "const", "default", "defer", "else", "fallthrough", "for", "func", "go", "goto", \
92 "if", "import", "interface", "map", "package", "range", "return", "select", "struct", "switch", "type", "var", \
93 "true", "false", "iota", "nil", \
94 "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", "float32", \
95 "float64", "complex64", "complex128", "bool", "byte", "rune", "string", "error", "make", "len", "cap", "new", "append", \
96 "copy", "close", "delete", "complex", "real", "imag", "panic", "recover", NULL }
97};
98
83static Elm_Code_Syntax _elm_code_syntax_md = 99static Elm_Code_Syntax _elm_code_syntax_md =
84{ 100{
85 "()[]*+-_=#.>!:\\`~|", 101 "()[]*+-_=#.>!:\\`~|",
@@ -106,6 +122,8 @@ elm_code_syntax_for_mime_get(const char *mime)
106 return &_elm_code_syntax_eo; 122 return &_elm_code_syntax_eo;
107 if (!strcmp("text/markdown", mime)) 123 if (!strcmp("text/markdown", mime))
108 return &_elm_code_syntax_md; 124 return &_elm_code_syntax_md;
125 if (!strcmp("text/x-go", mime))
126 return &_elm_code_syntax_go;
109 127
110 return NULL; 128 return NULL;
111} 129}