forked from alex-eg/sex
index a unit past its first bad form
Record plain declarations, with location and docstring, and keep going when one toplevel form is wrong. sexc --check and --symbols print that. Specs, realizations, and closure helpers stay out of the index for future rework (@alex-eg).
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
(chicken module)
|
||||
(chicken pathname)
|
||||
(chicken platform) ; software-version, machine-type
|
||||
(chicken port) ; open-input-string
|
||||
(only (chicken string) substring-index)
|
||||
(only srfi-1 every any) ; srfi-1 also has an append-reverse
|
||||
utils)
|
||||
@@ -28,6 +29,7 @@
|
||||
(export
|
||||
read-from-file
|
||||
read-raw-forms
|
||||
read-sex-string
|
||||
|
||||
current-features
|
||||
platform-features
|
||||
@@ -613,3 +615,9 @@
|
||||
(parameterize ((current-source-file "stdin"))
|
||||
(parse-all (current-input-port)))
|
||||
(read-from-file input-source)))
|
||||
|
||||
;;; TEXT is a buffer the editor holds, named SOURCE-FILE so locations
|
||||
;;; and imports agree with the file it will be saved as.
|
||||
(define (read-sex-string text source-file)
|
||||
(parameterize ((current-source-file source-file))
|
||||
(parse-all (open-input-string text))))
|
||||
|
||||
Reference in New Issue
Block a user