From 6d798d92d4d7f6ee2195f98ebb9de6b8250ac883 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 21 Aug 2019 10:02:09 -0400 Subject: [PATCH] Highlight preprocessor directives --- kilo.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kilo.c b/kilo.c index a65cfb4..17ad3fa 100644 --- a/kilo.c +++ b/kilo.c @@ -108,11 +108,17 @@ struct editorConfig E; char *C_HL_extensions[] = { ".c", ".h", ".cpp", NULL }; char *C_HL_keywords[] = { + // Keywords "switch", "if", "while", "for", "break", "continue", "return", "else", "struct", "union", "typedef", "static", "enum", "class", "case", + // Types "int|", "long|", "double|", "float|", "char|", "unsigned|", "signed|", - "void|", NULL + "void|", + + // Preprocessor Directives + "#define|", "#endif|", "#error|", "#if|", "#ifdef|", "#ifndef|", "#include|", + "#undef|", NULL }; struct editorSyntax HLDB[] = {