Files
beluga/include/syntax_highlighter.h
T
Giorgio ar work cce1ffa903 mistral gagnant
2026-02-04 16:16:36 +01:00

25 lines
532 B
C

#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 {
TOKEN_KEYWORD,
TOKEN_DATATYPE,
TOKEN_STRING,
TOKEN_COMMENT,
TOKEN_NUMBER,
TOKEN_OPERATOR,
TOKEN_DEFAULT
} SyntaxTokenType;
const char *get_color(SyntaxTokenType type);
char *highlight_line(const char * line, int *length);
#endif