summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2021-09-16 16:34:51 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2021-09-16 16:34:51 +0900
commit12551d4f59d7512395929472c0af1509c83069ae (patch)
treec5e5d5f8676bd6f350d7b2af3cea3f24f9de0110
parent8db40ba61c663b1c3702f3aacb26d17147feb32b (diff)
No expand quoted expressions.
* vikalpa.scm (expand*): No expand quoted expressions.
-rw-r--r--tests/test-vikalpa.scm3
-rw-r--r--vikalpa.scm3
2 files changed, 5 insertions, 1 deletions
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)