diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-04-16 15:54:35 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-04-16 15:54:35 -0400 |
commit | 51ac447d409bb565178ab9d78d4b5200e89f2cf4 (patch) | |
tree | 0a45c9ba2215d00dd04afe75803ad103bc4236fb /syntax.c | |
parent | 2a3bbb6674fe3b0e4ff996cae750a6e2880315ef (diff) |
comment/uncomment selection
Diffstat (limited to 'syntax.c')
-rw-r--r-- | syntax.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -13,6 +13,30 @@ Language language_from_str(char const *str) { return LANG_NONE; } +// start of single line comment for language l +char const *language_comment_start(Language l) { + switch (l) { + case LANG_C: return "/* "; + case LANG_RUST: + case LANG_CPP: return "// "; + case LANG_PYTHON: return "# "; + case LANG_NONE: + case LANG_COUNT: + break; + } + return ""; +} + +// end of single line comment for language l +char const *language_comment_end(Language l) { + switch (l) { + case LANG_C: + return " */"; + default: + return ""; + } +} + // NOTE: returns the color setting, not the color ColorSetting syntax_char_type_to_color(SyntaxCharType t) { switch (t) { |