syntax fixing

This commit is contained in:
anon 2023-08-19 13:21:43 +02:00
parent 452d55d012
commit e5cf0b74ef

View File

@ -38,8 +38,8 @@ token * token_table[1000];
int token_table_top = 0; int token_table_top = 0;
token * new_token(const char * const syntax, token * new_token(const char * const syntax,
const token_t t, const token_t t,
const hl_group_t * const g) { const hl_group_t * const g) {
token * mt = (token*)malloc(sizeof(token)); token * mt = (token*)malloc(sizeof(token));
mt->hl = g; mt->hl = g;
mt->t = t; mt->t = t;
@ -57,7 +57,7 @@ void new_keyword_tokens(const char * const * words,
} }
int token_fits(const char* const pattern, int token_fits(const char* const pattern,
const char* const to) { const char* const to) {
if (pattern == NULL) { if (pattern == NULL) {
return true; return true;
} }
@ -95,7 +95,7 @@ void render_string(const char * const string,
display_t * display; display_t * display;
HASH_FIND_STR(display_table, mode, display); HASH_FIND_STR(display_table, mode, display);
// //
if(f){ if (f) {
display->callback(s, f, token_table[i]->hl->attributes); display->callback(s, f, token_table[i]->hl->attributes);
s += f; s += f;
} else { } else {