summaryrefslogtreecommitdiff
path: root/syntax.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-24 12:02:40 -0500
committerpommicket <pommicket@gmail.com>2022-12-24 12:02:40 -0500
commita6a06900bf7206dc86017bbb1895272ebfac5418 (patch)
tree2f49cee6002d5d10bb4afc0db18425e5f5dfb38e /syntax.c
parent1c346f2aba30fcb581f20f2b67bd5e6adcb4a7e6 (diff)
start LSP setting
Diffstat (limited to 'syntax.c')
-rw-r--r--syntax.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/syntax.c b/syntax.c
index b156451..dfd7035 100644
--- a/syntax.c
+++ b/syntax.c
@@ -13,6 +13,15 @@ Language language_from_str(char const *str) {
return LANG_NONE;
}
+const char *language_to_str(Language language) {
+ for (int i = 0; i < LANG_COUNT; ++i) {
+ if (language_names[i].lang == language)
+ return language_names[i].name;
+ }
+ return "???";
+
+}
+
// start of single line comment for language l -- used for comment/uncomment selection
char const *language_comment_start(Language l) {
switch (l) {