mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-07 05:06:37 +02:00
preserving internal define source info
This commit is contained in:
parent
3660755f4a
commit
66ae7b1c03
1 changed files with 4 additions and 1 deletions
5
eval.c
5
eval.c
|
@ -564,7 +564,9 @@ static sexp analyze_lambda (sexp ctx, sexp x) {
|
|||
if (sexp_pairp(sexp_caar(tmp))) {
|
||||
name = sexp_caaar(tmp);
|
||||
tmp = sexp_cons(ctx3, sexp_cdaar(tmp), sexp_cdar(tmp));
|
||||
value = analyze_lambda(ctx3, sexp_cons(ctx3, SEXP_VOID, tmp));
|
||||
tmp = sexp_cons(ctx3, SEXP_VOID, tmp);
|
||||
sexp_pair_source(tmp) = sexp_pair_source(sexp_caar(ls));
|
||||
value = analyze_lambda(ctx3, tmp);
|
||||
} else {
|
||||
name = sexp_caar(tmp);
|
||||
value = analyze(ctx3, sexp_cadar(tmp));
|
||||
|
@ -624,6 +626,7 @@ static sexp analyze_define (sexp ctx, sexp x) {
|
|||
sexp_push(ctx, sexp_lambda_sv(sexp_env_lambda(env)), name);
|
||||
sexp_push(ctx, sexp_lambda_locals(sexp_env_lambda(env)), name);
|
||||
tmp = sexp_cons(ctx, sexp_cdr(x), ctx);
|
||||
sexp_pair_source(sexp_cdr(x)) = sexp_pair_source(x);
|
||||
sexp_push(ctx, sexp_lambda_defs(sexp_env_lambda(env)), tmp);
|
||||
res = SEXP_VOID;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue