From 770934ec0bfb47f377ce3f980b9c79f2fa4d8602 Mon Sep 17 00:00:00 2001 From: gunboy001 Date: Thu, 21 Nov 2019 01:24:05 +0100 Subject: [PATCH] syntax markup prototype --- ste.c | 2 -- syntax/stes-c.json | 65 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 syntax/stes-c.json diff --git a/ste.c b/ste.c index 86f567b..2e271c9 100644 --- a/ste.c +++ b/ste.c @@ -338,8 +338,6 @@ void fileOpen (char *filename) /*------------------------------------- file operations ----------------------------------*/ -/* ----------------------------- row operations --------------------------- */ - /* take care of the cursor movement */ void cursorMove (int a) { diff --git a/syntax/stes-c.json b/syntax/stes-c.json new file mode 100644 index 0000000..4d160b3 --- /dev/null +++ b/syntax/stes-c.json @@ -0,0 +1,65 @@ +{ "color" : "grey", "value" : 5} +{ "color" : "red", "value" : 1} +{ "color" : "blue", "value" : 2} +{ "color" : "green", "value" : 3} +{ "color" : "yellow", "value" : 4} +{ "color" : "white", "value" : 0} +{ "color" : "pink", "value" : 6} + +{ "type" : "text", "color" : "white"} + +{ + "type" : "comment", + "color" : "grey", + "start" : ["//", "/*"], + "end" : ["\n", "*/"] +} + +{ + "type" : "macro", + "color" : "pink", + "start" : "#", + "end" : " " +} + +{ + "type" : "var", + "color" : "blue", + "match" : // must have a whitespace after match + [ + "int", "char", + "float", "double", + "void", "NULL" + ], + "start" : + [ + "int", "uint", + "int_least", "uint_least", + "int_fast", "uint_fast", + "intptr", "uintptr", + "intmax", "uintmax" + ], + "end" : "_t" +} + +{ + "type" : "struct", + "color" : "green", + "match" : + [ + "struct", "enum", + "union", "typedef" + ] +} + +{ + "type" : "attribute", + "color" : "yellow", + "match" : + [ + "static", "const", + "short", "long", + "signed", "unsigned", + "inline", "register" + ] +} \ No newline at end of file