From 12551d4f59d7512395929472c0af1509c83069ae Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Thu, 16 Sep 2021 16:34:51 +0900 Subject: No expand quoted expressions. * vikalpa.scm (expand*): No expand quoted expressions. --- tests/test-vikalpa.scm | 3 +++ vikalpa.scm | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test-vikalpa.scm b/tests/test-vikalpa.scm index 644cb6a..1a45273 100644 --- a/tests/test-vikalpa.scm +++ b/tests/test-vikalpa.scm @@ -424,4 +424,7 @@ (test-equal '(result/expr (quote b)) (system-eval (test) '(if '#f 'a 'b))) +(test-equal '(result/expr '((and) and)) + (system-eval (test) '(cons '(and) '(and)))) + (test-end "test-vikalpa") diff --git a/vikalpa.scm b/vikalpa.scm index dbf032b..480bbca 100644 --- a/vikalpa.scm +++ b/vikalpa.scm @@ -588,7 +588,8 @@ (expr expr)) (let ((new-expr (expand ms expr))) (if (equal? expr new-expr) - (if (pair? new-expr) + (if (and (not (expr-quoted? new-expr)) + (pair? new-expr)) (cons (expand* ms (car new-expr)) (expand* ms (cdr new-expr))) new-expr) -- cgit v1.2.3