Václav Kubernát | 329c6c3 | 2019-02-06 16:41:53 +0100 | [diff] [blame] | 1 | #include "ast_handlers.hpp" |
| 2 | std::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 | } |