aboutsummaryrefslogtreecommitdiff
path: root/src/interp.h
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-07-15 13:22:41 +0800
committerMistivia <i@mistivia.com>2025-07-15 13:23:35 +0800
commit4fdde0172948dfd875f58779b91cfa8e517acedf (patch)
tree34cacc524d878cf8dd54c44cd1c1302983e5f5a9 /src/interp.h
parentdab2284cd5aae14bb166c90105a8e7b1bd290dcd (diff)
add stacktracec
Diffstat (limited to 'src/interp.h')
-rw-r--r--src/interp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interp.h b/src/interp.h
index 515da15..1acd983 100644
--- a/src/interp.h
+++ b/src/interp.h
@@ -27,6 +27,9 @@ struct interp {
SExpRef reg;
SExpRef top_level;
SExpRef nil;
+ SExpRef stacktrace;
+ SExpRef filename;
+ int32_t linenum;
char *errmsg_buf;
Parser *parser;
int gensym_cnt;
@@ -75,6 +78,7 @@ SExpRef Interp_load_file(Interp *interp, const char *filename);
#define PUSH_REG(_x) { interp->reg = CONS((_x), interp->reg); }
#define POP_REG() { interp->reg = CDR(interp->reg); }
+const char *lisp_stacktrace_to_string(Interp *interp, SExpRef stacktrace);
const char* lisp_to_string(Interp *interp, SExpRef val);
SExpRef lisp_macroexpand1(Interp *interp, SExpRef macro, SExpRef args);
SExpRef lisp_nreverse(Interp *interp, SExpRef lst);