aboutsummaryrefslogtreecommitdiff
path: root/module/c/unlex.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/c/unlex.scm')
-rw-r--r--module/c/unlex.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/module/c/unlex.scm b/module/c/unlex.scm
index e3d36f86..e714816d 100644
--- a/module/c/unlex.scm
+++ b/module/c/unlex.scm
@@ -13,7 +13,8 @@
(typecheck tokens (list-of lexeme?))
(string-concatenate
(map (lambda (x) (cond (x preprocessing-token? => stringify-token)
- ((whitespace-token? x) (lexeme-body x))))
+ ((whitespace-token? x) (lexeme-body x))
+ ((other-token? x) (lexeme-body x))))
tokens)))
;; takes a list of preprocessing-token's, and return a "source" string
@@ -22,7 +23,8 @@
(string-concatenate
(map (lambda (x)
(cond ((preprocessing-token? x) (stringify-token x))
- ((whitespace-token? x) " ")))
+ ((whitespace-token? x) " ")
+ ((other-token? x) (lexeme-body x))))
(squeeze-whitespace tokens))))
(define (stringify-escape-sequence sub-token)