From 05540fc6038f452f5dc5f18412c918c33ad96027 Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Thu, 16 Feb 2023 14:32:56 -0800 Subject: changed project structure --- scope.c | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 scope.c (limited to 'scope.c') diff --git a/scope.c b/scope.c deleted file mode 100644 index afb9d5c..0000000 --- a/scope.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include "scope.h" -#include "hashtable.h" - -scope_t* init_scope(scope_t parent) { - scope_t* scope = malloc(sizeof(scope_t)); - scope->hashtable = init_hashtable(1000); - *(scope->parent) = parent; - return scope; -} -pair_t* get_pair_global(scope_t* scope, char* key) { - while (scope->parent != NULL) { - pair_t* pair = hashtable_get_pair(scope->hashtable, key); - if (pair != NULL) { - return pair; - } - scope = scope->parent; - } - return NULL; -} -- cgit v1.3.1