Created a tokenizer and the supporting code, currently processes text that is not a string literal.

This commit is contained in:
2025-01-07 23:52:03 -06:00
parent 2c85077031
commit 7e70c6fd19
10 changed files with 351 additions and 12 deletions
+3 -1
View File
@@ -32,8 +32,10 @@ KeyValPair* KeyValPairCreate(const char* key, void* value) {
int DictionaryAdd(struct _dictionary* dict, const char* key, void* value) {
if (!dict) return 0;
if (dict->Size = dict->Capacity) {
if (dict->Size == dict->Capacity) {
dict->Pairs = realloc(dict->Pairs, sizeof(KeyValPair*) * dict->Capacity * 2);
dict->Capacity *= 2;
}
dict->Pairs[dict->Size] = KeyValPairCreate(key, value);