aboutsummaryrefslogtreecommitdiff
path: root/src/sexp.h
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-06-19 22:02:56 +0800
committerMistivia <i@mistivia.com>2025-06-19 22:02:56 +0800
commitb7faf6f020743afb1c06161bc1696f66e0b788e0 (patch)
tree261b4638c9545f14858cd8eed0ea9703cbdacec7 /src/sexp.h
parent8e51de8109a682068b4e7ac5f57adf8e450b1415 (diff)
add userfunc
Diffstat (limited to 'src/sexp.h')
-rw-r--r--src/sexp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sexp.h b/src/sexp.h
index 35996e4..1fc0ce9 100644
--- a/src/sexp.h
+++ b/src/sexp.h
@@ -24,6 +24,10 @@ typedef struct {
SExpRef env;
} SExpFunc;
+struct interp;
+typedef struct interp Interp;
+typedef SExpRef (*LispUserFunc)(Interp *interp, SExpRef args);
+
typedef struct {
SExpRef args;
SExpRef body;
@@ -53,6 +57,7 @@ typedef enum {
kUserDataSExp,
kPairSExp,
kFuncSExp,
+ kUserFuncSExp,
kEnvSExp,
kBindingSExp,
kMacroSExp,
@@ -71,6 +76,7 @@ struct sexp {
const void *userdata;
SExpPair pair;
SExpFunc func;
+ LispUserFunc userfunc;
SExpEnv env;
SExpBinding binding;
SExpMacro macro;