From: Taylor R Campbell Date: Sun, 23 May 2010 20:23:19 +0000 (+0000) Subject: Fix parsing of comments. X-Git-Tag: 20100708-Gtk~36^2~2 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=676246a1157bfbd25220145b9438e70fea2bfe8f;p=mit-scheme.git Fix parsing of comments. Comment handlers should return CONTINUE-PARSING, not UNSPECIFIC. --- diff --git a/src/runtime/parse.scm b/src/runtime/parse.scm index 17bbca3ba..7ca6855d3 100644 --- a/src/runtime/parse.scm +++ b/src/runtime/parse.scm @@ -217,7 +217,7 @@ USA. (if (eof-object? char) char (case char - ((#\newline) unspecific) + ((#\newline) continue-parsing) ((#\-) (dash)) (else (scan)))))) @@ -226,16 +226,17 @@ USA. (if (eof-object? char) char (case char - ((#\newline) unspecific) + ((#\newline) continue-parsing) ((#\*) (let ((char (%read-char port db))) (if (eof-object? char) char (case char - ((#\newline) unspecific) + ((#\newline) continue-parsing) ((#\-) (process-file-attributes - (parse-file-attributes-line port db false) port) + (parse-file-attributes-line port db false) + port) (discard restart-parsing)) (else (scan)))))) ((#\-) (dash)) @@ -255,8 +256,7 @@ USA. (scan) (discard continue-parsing))) -(define (handler:multi-line-comment - port db ctx char1 char2) +(define (handler:multi-line-comment port db ctx char1 char2) (declare (ignore ctx char1 char2)) ;; In addition to parsing out the multi-line-comment, we want to ;; extract out the file attribute line if it exists in the first @@ -288,7 +288,7 @@ USA. (define (vbar) (case (%read-char/no-eof port db) ((#\newline) (discard 0 continue-parsing)) - ((#\#) unspecific) ; end of comment + ((#\#) continue-parsing) ; end of comment ((#\-) (dash)) ((#\|) (vbar)) (else (scan))))