Adding sexp options support.

This commit is contained in:
Alex Shinn 2015-04-21 12:23:01 +09:00
parent 5f97353ff5
commit 79652b8fd5
2 changed files with 8 additions and 0 deletions

View file

@ -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)

View file

@ -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)