add dictionaries and add accessing with a value

This commit is contained in:
2025-06-12 04:37:07 +01:00
parent f8207702e1
commit b05408ebec
10 changed files with 190 additions and 38 deletions

View File

@@ -0,0 +1,16 @@
#ifndef DICTIONARY_H
#define DICTIONARY_H
#include "../../lexer/token.h" // for Token
#include "../parser.h"
typedef struct {
ParsedValue * key;
ParsedValue * value;
} ParsedDictionaryEntry;
ParsedValue *parse_dictionary(char *file, DArray *tokens,
size_t *index);
void free_parsed_dictionary(void *ptr);
#endif // DICTIONARY_H