diff options
| author | Mistivia <i@mistivia.com> | 2025-06-28 19:54:37 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-06-28 19:54:37 +0800 |
| commit | 9a4f460d6dd476767ea211c879f115e127ee2410 (patch) | |
| tree | 8a7ad58e670065af74c261f51f5f21e9bfec3615 /src/interp.h | |
| parent | 0633c6c2797bc9182b2c1888385eac6cb6caed10 (diff) | |
exception & try-catch
Diffstat (limited to 'src/interp.h')
| -rw-r--r-- | src/interp.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/interp.h b/src/interp.h index 0a489cb..1d3a2b4 100644 --- a/src/interp.h +++ b/src/interp.h @@ -56,6 +56,7 @@ SExpRef Interp_load_file(Interp *interp, const char *filename); #define CTL_FL(_x) \ (REF((_x))->type == kErrSignal \ || REF((_x))->type == kReturnSignal \ + || REF((_x))->type == kExceptionSignal \ || REF((_x))->type == kBreakSignal \ || REF((_x))->type == kContinueSignal) #define VALTYPE(_x) (REF((_x))->type) @@ -118,6 +119,7 @@ SExpRef new_primitive(Interp *interp, LispPrimitive val); SExpRef new_lambda(Interp *interp, SExpRef param, SExpRef body, SExpRef env); SExpRef new_macro(Interp *interp, SExpRef param, SExpRef body); SExpRef new_tailcall(Interp *interp, SExpRef fn, SExpRef args); +SExpRef new_exception(Interp *interp, SExpRef e); SExpRef new_list1(Interp *ctx, SExpRef e1); SExpRef new_list2(Interp *ctx, SExpRef e1, SExpRef e2); SExpRef new_list3(Interp *ctx, SExpRef e1, SExpRef e2, SExpRef e3); |
