aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/parser.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-02-23 05:30:53 -0400
committerEduardo Julian2022-02-23 05:30:53 -0400
commitf27a91a7b67790272578692ea20e2d875dbb3d35 (patch)
treecf0d9a53f3ef1b16be92ee5a120651b1abbb866d /stdlib/source/program/aedifex/parser.lux
parentf07effd9faf3fdaa677f659d6bbccf98931c5e5a (diff)
ADDED Can pass config parameters to compiler and select code based on it. Can also select code based on compiler version.
Diffstat (limited to 'stdlib/source/program/aedifex/parser.lux')
-rw-r--r--stdlib/source/program/aedifex/parser.lux26
1 files changed, 18 insertions, 8 deletions
diff --git a/stdlib/source/program/aedifex/parser.lux b/stdlib/source/program/aedifex/parser.lux
index 52a9a292c..097373529 100644
--- a/stdlib/source/program/aedifex/parser.lux
+++ b/stdlib/source/program/aedifex/parser.lux
@@ -9,12 +9,14 @@
[data
["[0]" text]
[collection
- ["[0]" dictionary {"+" Dictionary}]
- ["[0]" set {"+" Set}]]]
+ ["[0]" set {"+" Set}]
+ ["[0]" dictionary {"+" Dictionary}
+ ["[0]" plist {"+" PList}]]]]
[tool
[compiler
[meta
- [cli {"+" Compiler}]
+ [cli
+ [compiler {"+" Compiler}]]
[archive
[module
[descriptor {"+" Module}]]]]]]
@@ -179,10 +181,14 @@
<code>.text)
(def: deploy_repository
- (Parser (List [Text //repository.Address]))
- (<code>.tuple (<>.some
- (<>.and <code>.text
- ..repository))))
+ (Parser [Text //repository.Address])
+ (<>.and <code>.text
+ ..repository))
+
+(def: configuration/1
+ (Parser [Text Text])
+ (<>.and <code>.text
+ <code>.text))
(def: runtime
(Parser Runtime)
@@ -237,7 +243,10 @@
^deploy_repositories (: (Parser (Dictionary Text //repository.Address))
(<| (# ! each (dictionary.of_list text.hash))
(<>.else (list))
- (..singular input "deploy_repositories" ..deploy_repository)))
+ (..plural input "deploy_repositories" ..deploy_repository)))
+ ^configuration (: (Parser (PList Text))
+ (<| (<>.else (list))
+ (..plural input "configuration" ..configuration/1)))
^java (|> ..runtime
(..singular input "java")
(<>.else //runtime.default_java))
@@ -266,6 +275,7 @@
^program
^test
^deploy_repositories
+ ^configuration
^java
^js
^python