From 9965c551e7ccd6de8c47c7b1b78f804801810dac Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 16 May 2020 20:19:34 -0400 Subject: Parallel compilation for the new compiler(s). --- stdlib/source/program/compositor/cli.lux | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 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 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 [ ] - [(def: #export + [(def: (Parser Text) (cli.named 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))) -- cgit v1.2.3