blob: ca5fe25a23625628efbfb90e46ce64f520449583 [file] [log] [blame]
Václav Kubernát329c6c32019-02-06 16:41:53 +01001#include "ast_handlers.hpp"
2std::set<std::string> generateMissingKeyCompletionSet(std::set<std::string> keysNeeded, std::set<std::string> currentSet)
3{
4 std::set<std::string> missingKeys;
5 std::set_difference(keysNeeded.begin(), keysNeeded.end(),
6 currentSet.begin(), currentSet.end(),
7 std::inserter(missingKeys, missingKeys.end()));
8
9 std::set<std::string> res;
10
11 std::transform(missingKeys.begin(), missingKeys.end(),
12 std::inserter(res, res.end()),
13 [] (auto it) { return it + "="; });
14 return res;
15}