mescc: Nyacc comment escapes.
* module/mescc/compile.scm (ast->comment): Nyacc comment escapes.
This commit is contained in:
parent
dc4b7f3a37
commit
6ab9a206bb
|
@ -581,7 +581,12 @@
|
||||||
|
|
||||||
(define (ast->comment o)
|
(define (ast->comment o)
|
||||||
(if mes? '()
|
(if mes? '()
|
||||||
(let ((source (with-output-to-string (lambda () (pretty-print-c99 o)))))
|
(let* ((source (with-output-to-string (lambda () (pretty-print-c99 o))))
|
||||||
|
;; Nyacc fixups
|
||||||
|
(source (string-substitute source "\\" "\\\\"))
|
||||||
|
(source (string-substitute source "'\\'" "'\\\\'"))
|
||||||
|
(source (string-substitute source "'\"'" "'\\\"'"))
|
||||||
|
(source (string-substitute source "'''" "'\\''")))
|
||||||
(make-comment (string-join (string-split source #\newline) " ")))))
|
(make-comment (string-join (string-split source #\newline) " ")))))
|
||||||
|
|
||||||
(define (r*n info n)
|
(define (r*n info n)
|
||||||
|
|
Loading…
Reference in a new issue