original commit: 2d20748107b752704a44294b0b2b115176ec4e9a
This commit is contained in:
Matthew Flatt 2003-10-16 11:49:01 +00:00
parent 91bd1cc28d
commit 8fae6f71f0

View File

@ -105,13 +105,13 @@
(lambda (str)
(regexp-replace re:right-spaces str "")))
(define re:comments (regexp "\\(.*\\)"))
(define re:comments (regexp "^[^\"]*(\"[^\"]*\")*[^\"]*(\\(.*\\))"))
(define trim-comments
(lambda (str)
(let* ((positions (regexp-match-positions re:comments str)))
(if positions
(string-append (substring str 0 (caar positions))
(substring str (cdar positions) (string-length str)))
(string-append (substring str 0 (caaddr positions))
(substring str (cdaddr positions) (string-length str)))
str))))
(define lowercase