aboutsummaryrefslogtreecommitdiff
path: root/module/c/compiler.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-07-23 23:34:11 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-08-18 16:38:37 +0200
commit309c6a49f75283e34ca027bf32d80821a226cf25 (patch)
tree51b297040c32519388ae30b4f8a6374f671b1afe /module/c/compiler.scm
parentOnly parse h-strings where applicable. (diff)
downloadcalp-309c6a49f75283e34ca027bf32d80821a226cf25.tar.gz
calp-309c6a49f75283e34ca027bf32d80821a226cf25.tar.xz
General cleanup around cpp.
Diffstat (limited to 'module/c/compiler.scm')
-rw-r--r--module/c/compiler.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/c/compiler.scm b/module/c/compiler.scm
index c1563a0b..6e226d7d 100644
--- a/module/c/compiler.scm
+++ b/module/c/compiler.scm
@@ -7,7 +7,7 @@
:use-module ((c preprocessor2)
:select (preprocess-string
make-default-environment))
- :use-module ((hnh util values) :select (abort* on-fst))
+ :use-module ((hnh util values) :select (abort* on-fst on-snd))
:use-module ((c ast) :select (build-ast))
:export (run-compiler
compile-string
@@ -22,14 +22,14 @@
(define* (compile-string str optional: (environment (make-default-environment)))
- (on-fst (build-ast (abort* (preprocess-string str environment)))))
+ (on-snd (build-ast (abort* (preprocess-string str environment)))))
(define the-environment (make-parameter (make-default-environment)))
(define* (compile-string* str)
- (let ((result cpp-env (compile-string str)))
+ (let ((cpp-env result (compile-string str)))
(if (null? result)
(compile-string (string-append str ";")
(the-environment))