aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/compositor/cli.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-05-16 20:19:34 -0400
committerEduardo Julian2020-05-16 20:19:34 -0400
commit9965c551e7ccd6de8c47c7b1b78f804801810dac (patch)
tree05538c6ede048898f375ce3a333a2c4dd6b6f4a7 /stdlib/source/program/compositor/cli.lux
parent65d0beab4cb53a9ba8574e1133d105420f0b23aa (diff)
Parallel compilation for the new compiler(s).
Diffstat (limited to '')
-rw-r--r--stdlib/source/program/compositor/cli.lux31
1 files changed, 15 insertions, 16 deletions
diff --git a/stdlib/source/program/compositor/cli.lux b/stdlib/source/program/compositor/cli.lux
index 4453d5d36..0c20257ed 100644
--- a/stdlib/source/program/compositor/cli.lux
+++ b/stdlib/source/program/compositor/cli.lux
@@ -4,23 +4,20 @@
["p" parser
["." cli (#+ Parser)]]]
[world
- [file (#+ Path)]]]
- ## [///
- ## [importer (#+ Source)]]
- )
+ [file (#+ Path)]]])
+
+(type: #export Service
+ #Compilation
+ #Interpretation)
(type: #export Configuration
- {## #sources (List Source)
+ {#service Service
#sources (List Path)
#target Path
#module Text})
-(type: #export Service
- (#Compilation Configuration)
- (#Interpretation Configuration))
-
(template [<name> <long>]
- [(def: #export <name>
+ [(def: <name>
(Parser Text)
(cli.named <long> cli.any))]
@@ -29,15 +26,17 @@
[module "--module"]
)
+
+(def: service
+ (Parser Service)
+ ($_ p.or
+ (cli.this "build")
+ (cli.this "repl")))
+
(def: #export configuration
(Parser Configuration)
($_ p.and
+ ..service
(p.some ..source)
..target
..module))
-
-(def: #export service
- (Parser Service)
- ($_ p.or
- (p.after (cli.this "build") ..configuration)
- (p.after (cli.this "repl") ..configuration)))