diff options
author | Eduardo Julian | 2020-05-28 22:13:39 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-05-28 22:13:39 -0400 |
commit | fcb1dcee2a4d502b41852a4c8e26b53ae7b2041e (patch) | |
tree | 704aa1808b8c27208a942f2af4cbd9adbc5f324a /stdlib/source/program/compositor/cli.lux | |
parent | 2139e72d8e7c58cb355799d4a8412a0c38fb481c (diff) |
Can now export Lux code as library TAR files.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/compositor/cli.lux | 69 |
1 files changed, 41 insertions, 28 deletions
diff --git a/stdlib/source/program/compositor/cli.lux b/stdlib/source/program/compositor/cli.lux index 0c20257ed..940665680 100644 --- a/stdlib/source/program/compositor/cli.lux +++ b/stdlib/source/program/compositor/cli.lux @@ -1,42 +1,55 @@ (.module: - [lux #* + [lux (#- Module Source) [control - ["p" parser + ["<>" parser ["." cli (#+ Parser)]]] + [tool + [compiler + [meta + [archive + [descriptor (#+ Module)]]]]] [world [file (#+ Path)]]]) -(type: #export Service - #Compilation - #Interpretation) +(type: #export Source Path) +(type: #export Target Path) + +(type: #export Compilation + [(List Source) Target Module]) + +(type: #export Export + [(List Source) Target]) -(type: #export Configuration - {#service Service - #sources (List Path) - #target Path - #module Text}) +(type: #export Service + (#Compilation Compilation) + (#Interpretation Compilation) + (#Export Export)) -(template [<name> <long>] +(template [<name> <long> <type>] [(def: <name> - (Parser Text) + (Parser <type>) (cli.named <long> cli.any))] - [source "--source"] - [target "--target"] - [module "--module"] + [source "--source" Source] + [target "--target" Target] + [module "--module" Module] ) - -(def: service +(def: #export service (Parser Service) - ($_ p.or - (cli.this "build") - (cli.this "repl"))) - -(def: #export configuration - (Parser Configuration) - ($_ p.and - ..service - (p.some ..source) - ..target - ..module)) + ($_ <>.or + (<>.after (cli.this "build") + ($_ <>.and + (<>.some ..source) + ..target + ..module)) + (<>.after (cli.this "repl") + ($_ <>.and + (<>.some ..source) + ..target + ..module)) + (<>.after (cli.this "export") + ($_ <>.and + (<>.some ..source) + ..target)) + )) |