From 54c0e9c7397908eeddf5fbed9b193e25648fb253 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 5 Sep 2021 03:25:28 -0400 Subject: De-taggification | part 3 --- stdlib/source/program/aedifex/parser.lux | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 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 0284d3ced..315021712 100644 --- a/stdlib/source/program/aedifex/parser.lux +++ b/stdlib/source/program/aedifex/parser.lux @@ -84,22 +84,22 @@ (do {! <>.monad} [input (\ ! each (dictionary.of_list text.hash) - (.tuple (<>.some (<>.and .local_tag + (.tuple (<>.some (<>.and .text .any))))] ($_ <>.and (..singular input "name" ..name) (..singular input "url" ..url) (<>.else #/.Repo (..singular input "type" - (<>.or (.this! (' #repo)) - (.this! (' #manual)))))))) + (<>.or (.this! (' "repo")) + (.this! (' "manual")))))))) (def: organization (Parser /.Organization) (do {! <>.monad} [input (\ ! each (dictionary.of_list text.hash) - (.tuple (<>.some (<>.and .local_tag + (.tuple (<>.some (<>.and .text .any))))] ($_ <>.and (..singular input "name" ..name) @@ -110,7 +110,7 @@ (do {! <>.monad} [input (\ ! each (dictionary.of_list text.hash) - (.tuple (<>.some (<>.and .local_tag + (.tuple (<>.some (<>.and .text .any))))] ($_ <>.and (..singular input "name" ..name) @@ -127,7 +127,7 @@ (do {! <>.monad} [input (\ ! each (dictionary.of_list text.hash) - (.tuple (<>.some (<>.and .local_tag + (.tuple (<>.some (<>.and .text .any))))] ($_ <>.and (<>.maybe (..singular input "url" ..url)) @@ -183,7 +183,7 @@ (do {! <>.monad} [input (\ ! each (dictionary.of_list text.hash) - (.tuple (<>.some (<>.and .local_tag + (.tuple (<>.some (<>.and .text .any)))) .let [^parents (: (Parser (List /.Name)) (<>.else (list) @@ -260,14 +260,7 @@ (def: .public project (Parser Project) - (let [default_profile (: (Parser Project) - (\ <>.monad each - (|>> [/.default] (list) (dictionary.of_list text.hash)) - ..profile)) - multi_profile (: (Parser Project) - (\ <>.monad each - (dictionary.of_list text.hash) - (.tuple (<>.many (<>.and .text - ..profile)))))] - (<>.either multi_profile - default_profile))) + (\ <>.monad each + (dictionary.of_list text.hash) + (.tuple (<>.many (<>.and .text + ..profile))))) -- cgit v1.2.3