aboutsummaryrefslogtreecommitdiffstats
path: root/csc/flag.csc
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2022-07-29 16:42:27 -0700
committerRose Hogenson <rhogenson@posteo.net>2022-07-29 16:42:27 -0700
commit0ddb8fb300b916605baa2552eec3dc77b4e6e154 (patch)
treea4c9bf70efcf8a950f2e85ecb22b9094e791ca63 /csc/flag.csc
parentWrite the CLI frontend. (diff)
downloadchromatopelma-0ddb8fb300b916605baa2552eec3dc77b4e6e154.tar.zst
Fix some compilation errors in the compiler.
Diffstat (limited to 'csc/flag.csc')
-rw-r--r--csc/flag.csc12
1 files changed, 9 insertions, 3 deletions
diff --git a/csc/flag.csc b/csc/flag.csc
index ea699db..c328dcf 100644
--- a/csc/flag.csc
+++ b/csc/flag.csc
@@ -9,16 +9,22 @@
parse-error?
parse-flags)
(import (scheme base)
+ (only (scheme process-context)
+ command-line)
(only (csc hash-map)
compare-strings
+ insert
key-not-found-error?
lookup
make-map)
(only (csc loop)
loop)
+ (only (csc match)
+ match)
(only (csc strings)
- prefix?
- contains?))
+ contains?
+ has-prefix?
+ split))
(begin
@@ -94,7 +100,7 @@
(set! value (car args))
(set! args (cdr args)))
(unless value
- (raise (make-parse-flag "flag needs an argument" s)))
+ (raise (make-parse-error "flag needs an argument" s)))
(parser value)))
#t)))
(loop while (parse-one))