Compare commits

...

3 Commits

Author SHA1 Message Date
sloum 50e4ca9c6f Adds nimf syntax 2020-08-01 15:12:17 -07:00
sloum 86d8319bcf Merge branch 'master' of https://git.rawtext.club/sloum/hermes 2020-03-14 13:58:48 -07:00
Sloom Sloum Sluom IV 6edaa8d3de Adds basic haiku support. 2020-02-29 10:37:05 -08:00
2 changed files with 19 additions and 2 deletions

View File

@ -21,7 +21,7 @@
// Apple does not seem to have basename available
// as a part of string.h, so import libgen if needed
#if __APPLE__
#if __APPLE__ || __HAIKU__
#include <libgen.h>
#endif

View File

@ -29,6 +29,7 @@ char *HTML_HL_extensions[] = {".html", ".html", NULL};
char *PHP_HL_extensions[] = {".php", NULL};
char *LUA_HL_extensions[] = {".lua", NULL};
char *MAN_HL_extensions[] = {".1", ".2", ".3", ".4", ".5", ".6", ".7", ".8", ".man", ".mdoc", ".1b", ".mandoc", NULL};
char *NIMF_HL_extensions[] = {".nh", ".nimf", ".nf", NULL};
// 2. Create a list of keywords. Keywords that end in "|" will be given
@ -110,6 +111,13 @@ char *MAN_HL_keywords[] = {
".TP", NULL
};
// Nimf
char *NIMF_HL_keywords[] = {
"do", "loop", ":", ";", "if", "then", "else", "error", "exit", "halt",
". |", "and|", "or|", "drop|", "<r|", "r>|", "@|", "!|", "var", "svar",
"over|", "dup|", NULL
};
static struct editorSyntax HLDB[] = {
// 3. Add an entry to the editorSyndax db (this var).
// See the C example comments for what each array member
@ -186,7 +194,16 @@ static struct editorSyntax HLDB[] = {
".end",
MAN_HL_keywords,
HL_HIGHLIGHT_STRINGS
}
},
{
"nimf",
NIMF_HL_extensions,
NULL,
"( ",
" )",
NIMF_HL_keywords,
HL_HIGHLIGHT_STRINGS
},
};
#define HLDB_ENTRIES (sizeof(HLDB) / sizeof(HLDB[0]))