From 309c6a49f75283e34ca027bf32d80821a226cf25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sat, 23 Jul 2022 23:34:11 +0200 Subject: General cleanup around cpp. --- module/c/compiler.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/c/compiler.scm') 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)) -- cgit v1.2.3