diff options
Diffstat (limited to 'src/builtins.c')
| -rw-r--r-- | src/builtins.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/builtins.c b/src/builtins.c index e39dfa4..9f605c1 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -7,6 +7,11 @@ #include <float.h> #include <math.h> +SExpRef builtin_throw(Interp *interp, SExpRef args) { + if (LENGTH(args) != 1) return new_error(interp, "throw: syntax error.\n"); + return new_exception(interp, CAR(args)); +} + SExpRef builtin_functionp(Interp *interp, SExpRef args) { if (LENGTH(args) != 1) { return new_error(interp, "function?: args num error.\n"); |
