Color theming

This commit is contained in:
Arthur Barraux
2026-01-22 14:00:47 +01:00
parent fa7f8d39d8
commit f3bd5dd1c9
15 changed files with 472 additions and 207 deletions
+10 -7
View File
@@ -1,10 +1,10 @@
#define COLOR_RESET "\033[0m"
#define COLOR_KEYWORD "\033[1;35m" // Bold magenta
#define COLOR_TYPE "\033[1;34m" // Bold blue
#define COLOR_STRING "\033[1;32m" // Bold green
#define COLOR_COMMENT "\033[0;36m" // Cyan
#define COLOR_NUMBER "\033[1;33m" // Bold yellow
#define COLOR_DEFAULT "\033[0;37m" // White
#ifndef SYNTAX_HIGHLIGHTER_H_
#define SYNTAX_HIGHLIGHTER_H_
#include "color.h"
// Color codes that only affect foreground, preserving your background color
#define COLOR_RESET "\x1b[39m" // Reset all (4 bytes)
// Token types
typedef enum {
@@ -18,3 +18,6 @@ typedef enum {
} TokenType;
char *highlight_line(const char * line, int *length);
#endif