dotted lists are allowed in macro calls.

This commit is contained in:
Alex Shinn 2014-09-05 23:00:35 +09:00
parent 2247580fa7
commit 11f8f163c5

5
eval.c
View file

@ -957,10 +957,11 @@ static sexp analyze (sexp ctx, sexp object, int depth, int defok) {
loop: loop:
if (sexp_pairp(x)) { if (sexp_pairp(x)) {
if (sexp_not(sexp_listp(ctx, x))) { cell = sexp_idp(sexp_car(x)) ? sexp_env_cell(ctx, sexp_context_env(ctx), sexp_car(x), 0) : NULL;
if (sexp_not(sexp_listp(ctx, x))
&& !(cell && sexp_macrop(sexp_cdr(cell)))) {
res = sexp_compile_error(ctx, "dotted list in source", x); res = sexp_compile_error(ctx, "dotted list in source", x);
} else if (sexp_idp(sexp_car(x))) { } else if (sexp_idp(sexp_car(x))) {
cell = sexp_env_cell(ctx, sexp_context_env(ctx), sexp_car(x), 0);
if (! cell) { if (! cell) {
res = analyze_app(ctx, x, depth); res = analyze_app(ctx, x, depth);
if (sexp_exceptionp(res)) if (sexp_exceptionp(res))