1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
;; -*-theme-d-*-
;; Copyright (C) 2019, 2022 Tommi Höynälänmaa
;; Distributed under GNU Lesser General Public License version 3,
;; see file doc/LGPL-3.
(define-interface (standard-library command-line-parser)
(import (standard-library core))
(define <argument-handler>
(:procedure (<string>) <none> nonpure))
(define-class <argument-descriptor>
(fields
(x-name (:union <string> <character>) public public)
(takes-argument? <boolean> public public)
(proc-handler <argument-handler> public public)))
(define <argument-descriptor-list>
(:uniform-list <argument-descriptor>))
(declare-method parse-command-line
(:simple-proc ((:uniform-list <string>)
<argument-descriptor-list>
(:procedure ((:uniform-list <string>)) <none>
nonpure))
<none> nonpure)))
|