mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
allow define-syntax inside core let-syntax to splice
This commit is contained in:
parent
1f5d816f59
commit
36651c4115
1 changed files with 2 additions and 0 deletions
2
eval.c
2
eval.c
|
@ -169,6 +169,8 @@ sexp sexp_env_define (sexp ctx, sexp env, sexp key, sexp value) {
|
|||
return sexp_user_exception(ctx, NULL, "immutable binding", key);
|
||||
cell = sexp_env_cell(ctx, env, key, 1);
|
||||
if (!cell) {
|
||||
while (sexp_env_syntactic_p(env) && sexp_env_parent(env))
|
||||
env = sexp_env_parent(env);
|
||||
sexp_env_push(ctx, env, tmp, key, value);
|
||||
} else if (sexp_immutablep(cell)) {
|
||||
res = sexp_user_exception(ctx, NULL, "immutable binding", key);
|
||||
|
|
Loading…
Add table
Reference in a new issue