Fixing the comment-at-end-of-file bug (PR#11982)

This commit is contained in:
Danny Yoo 2011-06-16 11:59:22 -04:00 committed by Eli Barzilay
parent 768baa5983
commit d78fccb75b
2 changed files with 5 additions and 1 deletions

View File

@ -50,7 +50,7 @@
;; regexps based on the above (more in make-dispatcher)
(define re:whitespaces (^px "\\s+"))
(define re:comment-start (^px ch:comment))
(define re:comment-line (^px "[^\n]*\n[ \t]*")) ; like tex's `%'
(define re:comment-line (^px "[^\n]*(?:\n|$)[ \t]*")) ; like tex's `%'
(define re:expr-escape (^px ch:expr-escape))
(define re:datums-begin (^px ch:datums-begin))
(define re:datums-end (^px ch:datums-end))

View File

@ -416,6 +416,10 @@ fo@o -@-> fo@o
-@->
(foo "bar " "\n" "baz")
---
hello @; comment at eof
-@->
hello
---
@foo{bar @;{a balanced comment} baz}
-@->
(foo "bar baz")