From 5e45337f2829376a552d4ff26121125c135aa2b7 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 5 Jul 2020 18:55:19 -0400 Subject: Got the JS compiler code to build again. --- stdlib/source/program/compositor/cli.lux | 36 +++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) (limited to 'stdlib/source/program/compositor/cli.lux') diff --git a/stdlib/source/program/compositor/cli.lux b/stdlib/source/program/compositor/cli.lux index e0bcd6e00..03235bbad 100644 --- a/stdlib/source/program/compositor/cli.lux +++ b/stdlib/source/program/compositor/cli.lux @@ -1,6 +1,7 @@ (.module: [lux (#- Module Source) [control + [pipe (#+ case>)] ["<>" parser ["." cli (#+ Parser)]]] [tool @@ -31,10 +32,10 @@ (Parser ) (cli.named cli.any))] - [source "--source" Source] - [library "--library" Library] - [target "--target" Target] - [module "--module" Module] + [^source "--source" Source] + [^library "--library" Library] + [^target "--target" Target] + [^module "--module" Module] ) (def: #export service @@ -42,18 +43,25 @@ ($_ <>.or (<>.after (cli.this "build") ($_ <>.and - (<>.some ..source) - (<>.some ..library) - ..target - ..module)) + (<>.some ..^source) + (<>.some ..^library) + ..^target + ..^module)) (<>.after (cli.this "repl") ($_ <>.and - (<>.some ..source) - (<>.some ..library) - ..target - ..module)) + (<>.some ..^source) + (<>.some ..^library) + ..^target + ..^module)) (<>.after (cli.this "export") ($_ <>.and - (<>.some ..source) - ..target)) + (<>.some ..^source) + ..^target)) )) + +(def: #export target + (-> Service Target) + (|>> (case> (^or (#Compilation [sources libraries target module]) + (#Interpretation [sources libraries target module]) + (#Export [sources target])) + target))) -- cgit v1.2.3