better error message if allowing any keyword and getting non-keyword
svn: r6922
This commit is contained in:
parent
802641d6e7
commit
7ea3fada9a
|
@ -177,8 +177,8 @@
|
|||
;; --------------------------------------------------------------------------
|
||||
;; main reader function for @ constructs
|
||||
|
||||
(define ((make-dispatcher start-inside?)
|
||||
char inp source-name line-num col-num position)
|
||||
(define/kw ((make-dispatcher #:key start-inside?)
|
||||
char inp source-name line-num col-num position)
|
||||
|
||||
(define (read-error line col pos msg . xs)
|
||||
(let* ([eof? (and (eq? 'eof msg) (pair? xs))]
|
||||
|
@ -488,12 +488,15 @@
|
|||
(list source-name line-num col-num position
|
||||
(span-from position))))]))
|
||||
|
||||
(define dispatcher (make-dispatcher #f))
|
||||
(define inside-dispatcher (make-dispatcher #t))
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; readtables
|
||||
|
||||
(define (make-at-readtable . args)
|
||||
)
|
||||
|
||||
(define dispatcher (make-dispatcher))
|
||||
(define inside-dispatcher (make-dispatcher #:start-inside? #t))
|
||||
|
||||
(provide make-at-readtable)
|
||||
(define make-at-readtable
|
||||
(readtable-cached
|
||||
|
@ -525,6 +528,9 @@
|
|||
(list source-name line-num col-num position
|
||||
(add1 (bytes-length (car m)))))))))))
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; readers
|
||||
|
||||
(define default-src (gensym 'scribble-reader))
|
||||
(define (src-name src port)
|
||||
(if (eq? src default-src) (object-name port) src))
|
||||
|
|
Loading…
Reference in New Issue
Block a user