mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 13:49:17 +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)))
|
(if (not (= 1 (string-length str)))
|
||||||
(list #f "expected a single character")
|
(list #f "expected a single character")
|
||||||
(list (string-ref str 0) #f)))
|
(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
|
(else
|
||||||
(list str #f))))))
|
(list str #f))))))
|
||||||
(define (lookup-conf-spec conf-spec syms strs)
|
(define (lookup-conf-spec conf-spec syms strs)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
(export parse-option parse-options parse-app run-application
|
(export parse-option parse-options parse-app run-application
|
||||||
app-help app-help-command)
|
app-help app-help-command)
|
||||||
(import (scheme base)
|
(import (scheme base)
|
||||||
|
(scheme read)
|
||||||
(scheme write)
|
(scheme write)
|
||||||
(scheme process-context)
|
(scheme process-context)
|
||||||
(srfi 1)
|
(srfi 1)
|
||||||
|
|
Loading…
Add table
Reference in a new issue