'=' support; ignore start end atoms for now
This commit is contained in:
11
source/hl.h
11
source/hl.h
@ -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));
|
||||
|
||||
|
Reference in New Issue
Block a user