diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/lyn/lookup.h | 29 | ||||
| -rw-r--r-- | include/lyn/lyn.h | 13 | 
2 files changed, 3 insertions, 39 deletions
| diff --git a/include/lyn/lookup.h b/include/lyn/lookup.h deleted file mode 100644 index 577d450..0000000 --- a/include/lyn/lookup.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef LYN_LOOKUP_H -#define LYN_LOOKUP_H - -#include <stddef.h> - -struct lookup_node { -	unsigned long hash; -	struct lookup_node *left, *right; -	char data[]; /* should be max aligned */ -}; - -struct lookup { -	size_t ns; -	struct lookup_node *root; -}; - -struct lookup lookup_create(size_t s); -void lookup_destroy(struct lookup *l); - -void *lookup_insert(struct lookup *l, const char *key, const void *n); -void *lookup_at(struct lookup *l, const char *key); - -#define lookupt_insert(type, l, key, n)\ -	(type *)lookup_insert(type, l, key, n) - -#define lookupt_at(type, l, key)\ -	*(type *)lookup_at(&l, key) - -#endif /* LYN_LOOKUP_H */ diff --git a/include/lyn/lyn.h b/include/lyn/lyn.h index ff79979..40429c2 100644 --- a/include/lyn/lyn.h +++ b/include/lyn/lyn.h @@ -1,23 +1,16 @@  #ifndef LYN_H  #define LYN_H +#include <stdio.h>  #include <lyn/parser.h> -#include <lyn/lookup.h>  #include <lyn/vec.h>  #define lyn_at(v, i)\  	vect_at(struct lyn_value, v, i) -struct lyn_scope { -	struct lyn_scope *parent; -	struct lookup visible; -}; -  struct lyn { -	struct lyn_scope *root; -	struct lyn_scope *cur; - -	struct lyn_value res; +	FILE *output; +	int depth;  };  typedef int (*lyn_call)(struct lyn *lyn, struct vec args); | 
