diff options
author | Eduardo Julian | 2022-06-27 03:26:33 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-06-27 03:26:33 -0400 |
commit | 149515fd173947dcff20558fca077fbd16dc9b6c (patch) | |
tree | 3271f60268a35a132391b857b9f7985f75cbfcd8 /stdlib/source/library | |
parent | 3265f6a71723c100559eaea188d3762ceedce3b9 (diff) |
New "parser" hierarchy. [Part 5]
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/program.lux | 18 | ||||
-rw-r--r-- | stdlib/source/library/lux/tool/compiler/meta/cli.lux | 29 | ||||
-rw-r--r-- | stdlib/source/parser/lux/data/collection/tree.lux (renamed from stdlib/source/library/lux/control/parser/tree.lux) | 11 | ||||
-rw-r--r-- | stdlib/source/parser/lux/program.lux (renamed from stdlib/source/library/lux/control/parser/cli.lux) | 4 |
4 files changed, 31 insertions, 31 deletions
diff --git a/stdlib/source/library/lux/program.lux b/stdlib/source/library/lux/program.lux index 99fb1832e..81b455cb1 100644 --- a/stdlib/source/library/lux/program.lux +++ b/stdlib/source/library/lux/program.lux @@ -5,15 +5,15 @@ [abstract [monad (.only do)]] [control + ["<>" parser] ["[0]" io] [concurrency - ["[0]" thread]] - ["<>" parser (.only) - ["<[0]>" cli]]] + ["[0]" thread]]] [macro (.only with_symbols) [syntax (.only syntax)] ["[0]" code (.only) - ["<[1]>" \\parser]]]]]) + ["<[1]>" \\parser]]]]] + ["</>" \\parser]) (type Arguments (Variant @@ -46,11 +46,11 @@ {#Parsed args} (` (.function ((~ g!program) (~ g!args)) - (case ((~! <cli>.result) (.is (~! (<cli>.Parser (io.IO .Any))) - ((~! do) (~! <>.monad) - [(~+ args) - (~ g!_) (~! <cli>.end)] - ((~' in) (~ initialization+event_loop)))) + (case ((~! </>.result) (.is (~! (</>.Parser (io.IO .Any))) + ((~! do) (~! <>.monad) + [(~+ args) + (~ g!_) (~! </>.end)] + ((~' in) (~ initialization+event_loop)))) (~ g!args)) {.#Right (~ g!output)} (~ g!output) diff --git a/stdlib/source/library/lux/tool/compiler/meta/cli.lux b/stdlib/source/library/lux/tool/compiler/meta/cli.lux index 685467d32..caeb07961 100644 --- a/stdlib/source/library/lux/tool/compiler/meta/cli.lux +++ b/stdlib/source/library/lux/tool/compiler/meta/cli.lux @@ -5,9 +5,8 @@ [monad (.only do)] [equivalence (.only Equivalence)]] [control - ["[0]" pipe] - ["<>" parser (.only) - ["<[0]>" cli (.only Parser)]]] + ["<>" parser] + ["[0]" pipe]] [data ["[0]" product] ["[0]" text (.only) @@ -22,6 +21,8 @@ [meta ["[0]" symbol] ["[0]" configuration (.only Configuration)]] + ["[0]" program + ["<[1]>" \\parser (.only Parser)]] [tool [compiler [meta @@ -73,15 +74,15 @@ (with_template [<name> <long> <type> <parser>] [(def <name> (Parser <type>) - (<cli>.named <long> <parser>))] + (<program>.named <long> <parser>))] - [host_dependency_parser "--host_dependency" Host_Dependency <cli>.any] - [library_parser "--library" Library <cli>.any] - [compiler_parser "--compiler" Compiler (<text>.then /compiler.parser <cli>.any)] - [source_parser "--source" Source <cli>.any] - [target_parser "--target" Target <cli>.any] - [module_parser "--module" Module <cli>.any] - [configuration_parser "--configuration" Configuration (<text>.then configuration.parser <cli>.any)] + [host_dependency_parser "--host_dependency" Host_Dependency <program>.any] + [library_parser "--library" Library <program>.any] + [compiler_parser "--compiler" Compiler (<text>.then /compiler.parser <program>.any)] + [source_parser "--source" Source <program>.any] + [target_parser "--target" Target <program>.any] + [module_parser "--module" Module <program>.any] + [configuration_parser "--configuration" Configuration (<text>.then configuration.parser <program>.any)] ) (def .public service @@ -96,11 +97,11 @@ ..module_parser (<>.else configuration.empty ..configuration_parser)))] (all <>.or - (<>.after (<cli>.this "build") + (<>.after (<program>.this "build") compilation) - (<>.after (<cli>.this "repl") + (<>.after (<program>.this "repl") compilation) - (<>.after (<cli>.this "export") + (<>.after (<program>.this "export") (all <>.and (<>.some ..source_parser) ..target_parser)) diff --git a/stdlib/source/library/lux/control/parser/tree.lux b/stdlib/source/parser/lux/data/collection/tree.lux index e94e8a96c..5d10ce15b 100644 --- a/stdlib/source/library/lux/control/parser/tree.lux +++ b/stdlib/source/parser/lux/data/collection/tree.lux @@ -4,13 +4,12 @@ [abstract [monad (.only do)]] [control + ["//" parser] ["[0]" try (.only Try)] - ["[0]" exception (.only exception)]] - [data - [collection - [tree (.only Tree) - ["[0]" zipper (.only Zipper)]]]]]] - ["[0]" //]) + ["[0]" exception (.only exception)]]]] + [\\library + [/ (.only Tree) + ["[0]" zipper (.only Zipper)]]]) (type .public (Parser t a) (//.Parser (Zipper t) a)) diff --git a/stdlib/source/library/lux/control/parser/cli.lux b/stdlib/source/parser/lux/program.lux index 694cb93fc..e834136d8 100644 --- a/stdlib/source/library/lux/control/parser/cli.lux +++ b/stdlib/source/parser/lux/program.lux @@ -4,11 +4,11 @@ [abstract [monad (.only do)]] [control + ["//" parser] ["[0]" try (.only Try)]] [data ["[0]" text (.use "[1]#[0]" equivalence) - ["%" \\format (.only format)]]]]] - ["[0]" //]) + ["%" \\format (.only format)]]]]]) (type .public (Parser a) (//.Parser (List Text) a)) |