summaryrefslogtreecommitdiff
path: root/ted.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-07-22 14:54:07 -0400
committerpommicket <pommicket@gmail.com>2022-07-22 14:54:07 -0400
commit35b1b0129e8791a9412173acf3756606d0cc397d (patch)
tree6e631f6382cabf4ad2522bf4386828aaabae3347 /ted.h
parent47a65f608f485af32d2df12be489146ad67839e1 (diff)
go syntax highlighting
also :goto-line now clamps numbers < 1 and > nlines instead of rejecting them
Diffstat (limited to 'ted.h')
-rw-r--r--ted.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ted.h b/ted.h
index 2400aa0..01ad115 100644
--- a/ted.h
+++ b/ted.h
@@ -50,6 +50,11 @@ enum {
SYNTAX_STATE_JAVA_MULTILINE_COMMENT = 0x01u
};
+enum {
+ SYNTAX_STATE_GO_RAW_STRING = 0x01u, // backtick-enclosed string
+ SYNTAX_STATE_GO_MULTILINE_COMMENT = 0x02u
+};
+
typedef u8 SyntaxState;
// If you are adding new languages, DO NOT change the constant values
@@ -66,6 +71,7 @@ ENUM_U16 {
LANG_CONFIG = 8, // .cfg files, e.g. ted.cfg
LANG_JAVASCRIPT = 9,
LANG_JAVA = 10,
+ LANG_GO = 11,
LANG_COUNT
} ENUM_U16_END(Language);
@@ -86,6 +92,7 @@ static LanguageName const language_names[] = {
{LANG_CONFIG, "Config"},
{LANG_JAVASCRIPT, "Javascript"},
{LANG_JAVA, "Java"},
+ {LANG_GO, "Go"},
};
static_assert_if_possible(arr_count(language_names) == LANG_COUNT)