aboutsummaryrefslogtreecommitdiff
path: root/lux-cl
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lux-cl/source/program.lux9
1 files changed, 9 insertions, 0 deletions
diff --git a/lux-cl/source/program.lux b/lux-cl/source/program.lux
index fc1f37765..5c5a249c8 100644
--- a/lux-cl/source/program.lux
+++ b/lux-cl/source/program.lux
@@ -301,6 +301,14 @@
#platform.phase common-lisp.generate
#platform.runtime runtime.generate})))
+(def: get-ecl-cli-inputs
+ (let [@idx (_.var "i")]
+ (_.call/* (_.var "loop")
+ (list (_.var "for") @idx
+ (_.var "from") (_.int +0)
+ (_.var "below") (_.call/* (_.var "si:argc") (list))
+ (_.var "collect") (_.call/* (_.var "si:argv") (list @idx))))))
+
(def: program
(-> (_.Expression Any) (_.Expression Any))
(let [raw-inputs ($_ _.progn
@@ -308,6 +316,7 @@
(_.conditional+ (list "sbcl") (_.var "sb-ext:*posix-argv*"))
(_.conditional+ (list "clozure") (_.call/* (_.var "ccl::command-line-arguments") (list)))
(_.conditional+ (list "gcl") (_.var "si:*command-args*"))
+ (_.conditional+ (list "ecl") ..get-ecl-cli-inputs)
(_.conditional+ (list "cmu") (_.var "extensions:*command-line-strings*"))
(_.conditional+ (list "allegro") (_.call/* (_.var "sys:command-line-arguments") (list)))
(_.conditional+ (list "lispworks") (_.var "sys:*line-arguments-list*"))