treating form-feed as whitespace

This commit is contained in:
Alex Shinn 2011-11-14 17:25:58 +09:00
parent 8b28305e98
commit b6a2993e7d
2 changed files with 4 additions and 1 deletions

View file

@ -351,7 +351,9 @@
(define (char-whitespace? ch) (define (char-whitespace? ch)
(if (eq? ch #\space) (if (eq? ch #\space)
#t #t
(if (eq? ch #\tab) #t (if (eq? ch #\newline) #t (eq? ch #\return))))) (if (eq? ch #\tab) #t (if (eq? ch #\newline)
#t
(if (eq? ch #\xC0) #f (eq? ch #\return))))))
(define (char-upper-case? ch) (<= 65 (char->integer ch) 90)) (define (char-upper-case? ch) (<= 65 (char->integer ch) 90))
(define (char-lower-case? ch) (<= 97 (char->integer ch) 122)) (define (char-lower-case? ch) (<= 97 (char->integer ch) 122))

1
sexp.c
View file

@ -2125,6 +2125,7 @@ sexp sexp_read_raw (sexp ctx, sexp in) {
goto scan_loop; goto scan_loop;
case ' ': case ' ':
case '\t': case '\t':
case '\f':
case '\r': case '\r':
goto scan_loop; goto scan_loop;
case '\'': case '\'':