aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-07-22 17:24:23 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-07-22 17:24:23 +0200
commit19396bc87fe659433b18bb4f0447c23a677bbaa1 (patch)
tree4075aea08ecea2bc38dad0d4064521e0b10e2d8b
parentHandle nested #if trees. (diff)
downloadcalp-19396bc87fe659433b18bb4f0447c23a677bbaa1.tar.gz
calp-19396bc87fe659433b18bb4f0447c23a677bbaa1.tar.xz
Cpp "binary" now also prints parse result.
-rwxr-xr-xcpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp b/cpp
index 127a4920..bdc140d7 100755
--- a/cpp
+++ b/cpp
@@ -14,8 +14,11 @@ exec $GUILE -e main -s "$0" "$@"
(srfi srfi-88))
(define (main args)
- (let ((env tokens (preprocess-string (read-file (cadr args)) (make-default-environment))))
- (pprint-environment env)
+ (let* ((content (read-file (cadr args)))
+ (env tokens (preprocess-string content (make-default-environment))))
+ (pprint-environment env (current-output-port))
+ (newline)
+ (display "== tokens ==")
(newline)
(display (unlex tokens))
(newline)