From f19f672d057cdf3a8cccf8684b73af22442f4a37 Mon Sep 17 00:00:00 2001 From: Max Regan Date: Sun, 20 Nov 2022 22:31:23 -0500 Subject: [PATCH] Separate public header --- SConstruct | 2 +- src/uclisp.h | 53 ---------------------------------------------------- 2 files changed, 1 insertion(+), 54 deletions(-) delete mode 100644 src/uclisp.h diff --git a/SConstruct b/SConstruct index 84071ac..d6cc910 100644 --- a/SConstruct +++ b/SConstruct @@ -18,7 +18,7 @@ LIB_SRCS = [ "src/utility.c", "src/parse.c", ] -LIB_INCLUDES = ["src/"] +LIB_INCLUDES = ["src/", "include/"] TEST_SRCS = [ diff --git a/src/uclisp.h b/src/uclisp.h deleted file mode 100644 index 0e959e8..0000000 --- a/src/uclisp.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _UCLISP_H_ -#define _UCLISP_H_ - -enum ucl_type { - UCL_TYPE_CELL = 0, - UCL_TYPE_SYMBOL = 1, - UCL_TYPE_INT = 2, - UCL_TYPE_STRING = 3, - UCL_TYPE_ERROR = 4, - UCL_TYPE_BUILTIN = 5, - UCL_TYPE_SPECIAL = 6, // Like builtins, but special forms where arguments are not necessarily evaluated - UCL_TYPE_COUNT = 7, -}; - -struct ucl_cell { - struct ucl_object *car; - struct ucl_object *cdr; -}; - -struct ucl_scope; -typedef struct ucl_object *(*ucl_lisp)(struct ucl_scope* state, struct ucl_object *args); - -struct ucl_object { - union { - struct ucl_cell cell; - const char *symbol; - int integer; - const char *string; - const char *error; - ucl_lisp builtin; - ucl_lisp special; - }; - enum ucl_type type; - char reachable; -}; - - - -struct ucl_parse_result { - int result; - struct ucl_cell *statement; -}; - -struct ucl_scope; // TODO - -struct ucl_object *ucl_tokenize(const char *source); -struct ucl_object *ucl_parse(const char *sexp); -struct ucl_object *ucl_evaluate(struct ucl_scope *state, struct ucl_object *sexp); - -// TODO: State encapsulation is all wonky here) -void ucl_gc(); - -#endif