mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-05 12:16:37 +02:00
fixing line number info for implicit lambda defines
This commit is contained in:
parent
2c8c2a8c23
commit
46a07441f1
1 changed files with 1 additions and 1 deletions
2
eval.c
2
eval.c
|
@ -625,7 +625,6 @@ static sexp analyze_define (sexp ctx, sexp x) {
|
||||||
sexp_push(ctx, sexp_lambda_sv(sexp_env_lambda(env)), name);
|
sexp_push(ctx, sexp_lambda_sv(sexp_env_lambda(env)), name);
|
||||||
sexp_push(ctx, sexp_lambda_locals(sexp_env_lambda(env)), name);
|
sexp_push(ctx, sexp_lambda_locals(sexp_env_lambda(env)), name);
|
||||||
tmp = sexp_cons(ctx, sexp_cdr(x), ctx);
|
tmp = sexp_cons(ctx, sexp_cdr(x), ctx);
|
||||||
sexp_pair_source(tmp) = sexp_pair_source(x);
|
|
||||||
sexp_push(ctx, sexp_lambda_defs(sexp_env_lambda(env)), tmp);
|
sexp_push(ctx, sexp_lambda_defs(sexp_env_lambda(env)), tmp);
|
||||||
res = SEXP_VOID;
|
res = SEXP_VOID;
|
||||||
} else {
|
} else {
|
||||||
|
@ -634,6 +633,7 @@ static sexp analyze_define (sexp ctx, sexp x) {
|
||||||
if (sexp_pairp(sexp_cadr(x))) {
|
if (sexp_pairp(sexp_cadr(x))) {
|
||||||
tmp = sexp_cons(ctx, sexp_cdadr(x), sexp_cddr(x));
|
tmp = sexp_cons(ctx, sexp_cdadr(x), sexp_cddr(x));
|
||||||
tmp = sexp_cons(ctx, SEXP_VOID, tmp);
|
tmp = sexp_cons(ctx, SEXP_VOID, tmp);
|
||||||
|
sexp_pair_source(tmp) = sexp_pair_source(x);
|
||||||
value = analyze_lambda(ctx, tmp);
|
value = analyze_lambda(ctx, tmp);
|
||||||
} else
|
} else
|
||||||
value = analyze(ctx, sexp_caddr(x));
|
value = analyze(ctx, sexp_caddr(x));
|
||||||
|
|
Loading…
Add table
Reference in a new issue