diff options
| author | Mistivia <i@mistivia.com> | 2025-07-23 13:02:50 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-07-23 13:02:50 +0800 |
| commit | cc8ea3f88c75216c7c03342a4a41bbc7d0b354f5 (patch) | |
| tree | e508d96435bb5088dd679d61fc75032f326ccaca | |
| parent | fe6adec77e7f8697d4bc451bbbf7d60cefb45205 (diff) | |
fix filename init
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | interp.c | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -9,7 +9,7 @@ ifeq ($(mode), debug) -g \ -fsanitize=address else - cflags = $(includes) -O2 + cflags = $(includes) -g -O2 endif src = $(shell find ./ -maxdepth 1 -name '*.c' -not -name 'main.c') @@ -93,6 +93,9 @@ void Interp_init(Interp *self) { SExpVector_push_back(&self->objs, sexp); self->nil = (SExpRef){i}; i++; + self->filename.idx = 0; + self->linenum = 1; + sexp.type = kEnvSExp; sexp.env.parent= self->nil; sexp.env.bindings = self->nil; |
