From 50e4ca9c6fc5f6bb455ee25d73c875f2eec512b3 Mon Sep 17 00:00:00 2001 From: sloum Date: Sat, 1 Aug 2020 15:12:17 -0700 Subject: [PATCH] Adds nimf syntax --- syntaxhl.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/syntaxhl.h b/syntaxhl.h index 6ec2ac8..7f8a0b4 100644 --- a/syntaxhl.h +++ b/syntaxhl.h @@ -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|", "|", "@|", "!|", "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]))