diff options
Diffstat (limited to 'scope.c')
| -rw-r--r-- | scope.c | 20 |
1 files changed, 0 insertions, 20 deletions
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 <stdlib.h> -#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; -} |
