summaryrefslogtreecommitdiff
path: root/scheme/chez/geiser/geiser.ss
diff options
context:
space:
mode:
authorAaron Marks <nymacro@gmail.com>2020-01-03 23:29:15 +1000
committerAaron Marks <nymacro@gmail.com>2020-01-03 23:29:15 +1000
commita0f6fc32a81267154ed71f8668a1ecd227e7b37b (patch)
tree021bbf8b2136a4587177f3e91eff39f012d92d86 /scheme/chez/geiser/geiser.ss
parent7bc8f62409b66bdb35b934c632d7fea12a53d636 (diff)
downloadgeiser-chez-a0f6fc32a81267154ed71f8668a1ecd227e7b37b.tar.gz
geiser-chez-a0f6fc32a81267154ed71f8668a1ecd227e7b37b.tar.bz2
Add rudimentary Chez support for macro expansion0.11.20.11.10.11
Diffstat (limited to 'scheme/chez/geiser/geiser.ss')
-rw-r--r--scheme/chez/geiser/geiser.ss18
1 files changed, 11 insertions, 7 deletions
diff --git a/scheme/chez/geiser/geiser.ss b/scheme/chez/geiser/geiser.ss
index 70b6b67..5c92a5b 100644
--- a/scheme/chez/geiser/geiser.ss
+++ b/scheme/chez/geiser/geiser.ss
@@ -5,7 +5,8 @@
geiser:autodoc
geiser:no-values
geiser:load-file
- geiser:newline)
+ geiser:newline
+ geiser:macroexpand)
(import (chezscheme))
(define (last-index-of str-list char idx last-idx)
@@ -56,8 +57,8 @@
(k `((result "")
(output . ,(get-output-string output-string))
(error (key . ,(with-output-to-string
- (lambda ()
- (display-condition e))))))))
+ (lambda ()
+ (display-condition e))))))))
(lambda ()
(call-with-values
;; evaluate form, allow for multiple return values,
@@ -69,9 +70,9 @@
(eval form))))
(lambda result
`((result ,(with-output-to-string
- (lambda ()
- (pretty-print
- (if (null? (cdr result)) (car result) result)))))
+ (lambda ()
+ (pretty-print
+ (if (null? (cdr result)) (car result) result)))))
(output . ,(get-output-string output-string))))))))))
(newline)
(close-output-port output-string)))
@@ -145,4 +146,7 @@
#f)
(define (geiser:newline)
- #f))
+ #f)
+
+ (define (geiser:macroexpand form . rest)
+ (syntax->datum (expand form))))