Created a tokenizer and the supporting code, currently processes text that is not a string literal.
This commit is contained in:
+3
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user