diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/compositor/cli.lux | 31 |
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))) |