mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Adding sexp options support.
This commit is contained in:
parent
5f97353ff5
commit
79652b8fd5
2 changed files with 8 additions and 0 deletions
|
@ -33,6 +33,13 @@
|
|||
(if (not (= 1 (string-length str)))
|
||||
(list #f "expected a single character")
|
||||
(list (string-ref str 0) #f)))
|
||||
((sexp)
|
||||
(list (guard (exn (else str))
|
||||
(let* ((in (open-input-string str))
|
||||
(res (read in)))
|
||||
(close-input-port in)
|
||||
res))
|
||||
#f))
|
||||
(else
|
||||
(list str #f))))))
|
||||
(define (lookup-conf-spec conf-spec syms strs)
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
(export parse-option parse-options parse-app run-application
|
||||
app-help app-help-command)
|
||||
(import (scheme base)
|
||||
(scheme read)
|
||||
(scheme write)
|
||||
(scheme process-context)
|
||||
(srfi 1)
|
||||
|
|
Loading…
Add table
Reference in a new issue