From f0dd758b6c7f35ffb1f6b237805bcb8d39c20cc5 Mon Sep 17 00:00:00 2001 From: hop311 Date: Wed, 3 Jan 2024 14:30:23 +0000 Subject: Added case insensitive ordered set and map and IdentifierRegistry --- src/openvic-simulation/scripts/ConditionalWeight.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/openvic-simulation/scripts') diff --git a/src/openvic-simulation/scripts/ConditionalWeight.cpp b/src/openvic-simulation/scripts/ConditionalWeight.cpp index 29dc93b..17bbbd6 100644 --- a/src/openvic-simulation/scripts/ConditionalWeight.cpp +++ b/src/openvic-simulation/scripts/ConditionalWeight.cpp @@ -23,7 +23,9 @@ static NodeCallback auto expect_modifier(std::vector& items) { node_callback_t ConditionalWeight::expect_conditional_weight(base_key_t base_key) { return expect_dictionary_keys( // TODO - add days and years as options with a shared expected count of ONE_EXACTLY - base_key_to_string(base_key), ONE_EXACTLY, expect_fixed_point(assign_variable_callback(base)), + base_key_to_string(base_key), ZERO_OR_ONE, expect_fixed_point(assign_variable_callback(base)), + "days", ZERO_OR_ONE, success_callback, + "years", ZERO_OR_ONE, success_callback, "modifier", ZERO_OR_MORE, expect_modifier(condition_weight_items), "group", ZERO_OR_MORE, [this](ast::NodeCPtr node) -> bool { condition_weight_group_t items; -- cgit v1.2.3-56-ga3b1