Add quote special form
This commit is contained in:
@@ -19,10 +19,9 @@ int main(int argc, const char **argv) {
|
||||
ucl_state_put(state, "lambda", ucl_special_create(ucl_special_lambda));
|
||||
ucl_state_put(state, "setq", ucl_special_create(ucl_special_setq));
|
||||
ucl_state_put(state, "progn", ucl_special_create(ucl_special_progn));
|
||||
ucl_state_put(state, "quote", ucl_special_create(ucl_special_quote));
|
||||
|
||||
// TODO:
|
||||
// - progn
|
||||
// - quote
|
||||
// - iteration
|
||||
|
||||
ucl_state_put(state, "print", ucl_builtin_create(ucl_builtin_print));
|
||||
|
||||
@@ -101,3 +101,7 @@ struct ucl_object *ucl_special_setq(struct ucl_state *state, struct ucl_object *
|
||||
struct ucl_object *ucl_special_progn(struct ucl_state *state, struct ucl_object *args) {
|
||||
return ucl_progn(state, args);
|
||||
}
|
||||
|
||||
struct ucl_object *ucl_special_quote(struct ucl_state *state, struct ucl_object *args) {
|
||||
return ucl_car(args);
|
||||
}
|
||||
|
||||
@@ -9,5 +9,6 @@ struct ucl_object *ucl_special_defun(struct ucl_state *state, struct ucl_object
|
||||
struct ucl_object *ucl_special_lambda(struct ucl_state *state, struct ucl_object *args);
|
||||
struct ucl_object *ucl_special_setq(struct ucl_state *state, struct ucl_object *args);
|
||||
struct ucl_object *ucl_special_progn(struct ucl_state *state, struct ucl_object *args);
|
||||
struct ucl_object *ucl_special_quote(struct ucl_state *state, struct ucl_object *args);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user