mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-06 20:56:38 +02:00
dotted lists are allowed in macro calls.
This commit is contained in:
parent
2247580fa7
commit
11f8f163c5
1 changed files with 3 additions and 2 deletions
5
eval.c
5
eval.c
|
@ -957,10 +957,11 @@ static sexp analyze (sexp ctx, sexp object, int depth, int defok) {
|
|||
|
||||
loop:
|
||||
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);
|
||||
} else if (sexp_idp(sexp_car(x))) {
|
||||
cell = sexp_env_cell(ctx, sexp_context_env(ctx), sexp_car(x), 0);
|
||||
if (! cell) {
|
||||
res = analyze_app(ctx, x, depth);
|
||||
if (sexp_exceptionp(res))
|
||||
|
|
Loading…
Add table
Reference in a new issue