Add defun without evaluation

This commit is contained in:
2022-11-03 09:46:23 -04:00
parent 37a614515e
commit ddb5a8f842
17 changed files with 291 additions and 129 deletions

View File

@@ -49,7 +49,7 @@ struct ucl_object *ucl_error_create(const char *error)
}
struct ucl_object *ucl_builtin_create(ucl_builtin builtin)
struct ucl_object *ucl_builtin_create(ucl_lisp builtin)
{
struct ucl_object* obj = ucl_object_alloc();
obj->type = UCL_TYPE_BUILTIN;
@@ -57,6 +57,15 @@ struct ucl_object *ucl_builtin_create(ucl_builtin builtin)
return obj;
}
struct ucl_object *ucl_special_create(ucl_lisp special)
{
struct ucl_object* obj = ucl_object_alloc();
obj->type = UCL_TYPE_SPECIAL;
obj->special = special;
return obj;
}
static struct ucl_object* ucl_object_alloc() {
return malloc(sizeof(struct ucl_object));
}