diff options
author | pommicket <pommicket@gmail.com> | 2022-07-21 23:46:56 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-07-21 23:46:56 -0400 |
commit | 47a65f608f485af32d2df12be489146ad67839e1 (patch) | |
tree | 998051aba1da5da4a75e51bfee9a9a5d5b00b517 /ted.h | |
parent | 08da42c48bf40f24faa91c00b777ae15ac8f706b (diff) |
minor fixes, syntax highlighting for java & js
Diffstat (limited to 'ted.h')
-rw-r--r-- | ted.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -41,6 +41,15 @@ enum { SYNTAX_STATE_HTML_COMMENT = 0x01u }; +enum { + SYNTAX_STATE_JAVASCRIPT_TEMPLATE_STRING = 0x01u, + SYNTAX_STATE_JAVASCRIPT_MULTILINE_COMMENT = 0x02u, +}; + +enum { + SYNTAX_STATE_JAVA_MULTILINE_COMMENT = 0x01u +}; + typedef u8 SyntaxState; // If you are adding new languages, DO NOT change the constant values @@ -55,6 +64,8 @@ ENUM_U16 { LANG_MARKDOWN = 6, LANG_HTML = 7, LANG_CONFIG = 8, // .cfg files, e.g. ted.cfg + LANG_JAVASCRIPT = 9, + LANG_JAVA = 10, LANG_COUNT } ENUM_U16_END(Language); @@ -73,6 +84,8 @@ static LanguageName const language_names[] = { {LANG_MARKDOWN, "Markdown"}, {LANG_HTML, "HTML"}, {LANG_CONFIG, "Config"}, + {LANG_JAVASCRIPT, "Javascript"}, + {LANG_JAVA, "Java"}, }; static_assert_if_possible(arr_count(language_names) == LANG_COUNT) |