diff options
author | Eduardo Julian | 2022-07-09 14:35:38 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-07-09 14:35:38 -0400 |
commit | 7db42ab1b9d3c764772ca63c74bf44bb2b8b8325 (patch) | |
tree | bd1c865dea0902790f3e462cec4f9bc8d8ae428f /stdlib/source/program/aedifex/parser.lux | |
parent | fc2737b5226eda69c12bc593e83e22ed54e4d3af (diff) |
First-class programs instead of having a "lux program" extension.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/parser.lux | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/stdlib/source/program/aedifex/parser.lux b/stdlib/source/program/aedifex/parser.lux index 95197c4d9..0327a4cd9 100644 --- a/stdlib/source/program/aedifex/parser.lux +++ b/stdlib/source/program/aedifex/parser.lux @@ -1,6 +1,6 @@ (.require [library - [lux (.except Module) + [lux (.except type) [abstract [monad (.only do)]] [control @@ -19,10 +19,7 @@ [compiler [meta [cli - [compiler (.only Compiler)]] - [archive - [module - [descriptor (.only Module)]]]]]] + [compiler (.only Compiler)]]]]] [world [net (.only URL)]]]] ["[0]" // @@ -171,9 +168,13 @@ (Parser /.Target) <code>.text) -(def module - (Parser Module) - <code>.text) +(def module_or_program + (Parser Symbol) + <code>.symbol) + +(def program + (Parser Symbol) + <code>.global) (def deploy_repository (Parser [Text //repository.Address]) @@ -234,12 +235,12 @@ (|> ..target (..singular input "target") (<>.else /.default_target))) - ^program (is (Parser (Maybe Module)) + ^program (is (Parser (Maybe Symbol)) (<>.maybe - (..singular input "program" ..module))) - ^test (is (Parser (Maybe Module)) + (..singular input "program" ..module_or_program))) + ^test (is (Parser (Maybe Symbol)) (<>.maybe - (..singular input "test" ..module))) + (..singular input "test" ..program))) ^deploy_repositories (is (Parser (Dictionary Text //repository.Address)) (<| (at ! each (dictionary.of_list text.hash)) (<>.else (list)) |