Adds nimf syntax

This commit is contained in:
sloum 2020-08-01 15:12:17 -07:00
parent 86d8319bcf
commit 50e4ca9c6f
1 changed files with 18 additions and 1 deletions

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]))