diff options
author | hop311 <hop3114@gmail.com> | 2024-01-03 15:30:23 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-01-03 15:43:35 +0100 |
commit | f0dd758b6c7f35ffb1f6b237805bcb8d39c20cc5 (patch) | |
tree | 21e54285c4f3927ecd3b1b621587d75b875ac3d3 /src/openvic-simulation/scripts/ConditionalWeight.cpp | |
parent | 461ec160448373f8d9492b9c586ff53a35edef18 (diff) |
Added case insensitive ordered set and map and IdentifierRegistry
Diffstat (limited to 'src/openvic-simulation/scripts/ConditionalWeight.cpp')
-rw-r--r-- | src/openvic-simulation/scripts/ConditionalWeight.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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<T>& 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; |