'=' support; ignore start end atoms for now

This commit is contained in:
anon
2023-08-24 19:17:14 +02:00
parent 823eb8b113
commit 746767571e
2 changed files with 53 additions and 29 deletions

View File

@ -130,12 +130,13 @@ int new_char_tokens(const char * characters,
token_t * new_keyword_token(const char * const word,
hl_group_t * const g) {
size_t word_length = strlen(word);
char * new_word = (char*)malloc(word_length + 4 + 1);
char * new_word = strdup(word);
//size_t word_length = strlen(word);
//char * new_word = (char*)malloc(word_length + 4 + 1);
memcpy(new_word, "\\<", 2);
memcpy(new_word + 2, word, word_length);
strcpy(new_word + 2 + word_length, "\\>");
//memcpy(new_word, "\\<", 2);
//memcpy(new_word + 2, word, word_length);
//strcpy(new_word + 2 + word_length, "\\>");
token_t * mt = (token_t*)malloc(sizeof(token_t));