From f27a91a7b67790272578692ea20e2d875dbb3d35 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 23 Feb 2022 05:30:53 -0400 Subject: ADDED Can pass config parameters to compiler and select code based on it. Can also select code based on compiler version. --- stdlib/source/program/aedifex/parser.lux | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'stdlib/source/program/aedifex/parser.lux') 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 @@ .text) (def: deploy_repository - (Parser (List [Text //repository.Address])) - (.tuple (<>.some - (<>.and .text - ..repository)))) + (Parser [Text //repository.Address]) + (<>.and .text + ..repository)) + +(def: configuration/1 + (Parser [Text Text]) + (<>.and .text + .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 -- cgit v1.2.3