Tab completion for list keys
Change-Id: Ifbebd0e27d3a26237c12e5492a2737612fc7a644
diff --git a/src/ast_handlers.cpp b/src/ast_handlers.cpp
new file mode 100644
index 0000000..ca5fe25
--- /dev/null
+++ b/src/ast_handlers.cpp
@@ -0,0 +1,15 @@
+#include "ast_handlers.hpp"
+std::set<std::string> generateMissingKeyCompletionSet(std::set<std::string> keysNeeded, std::set<std::string> currentSet)
+{
+ std::set<std::string> missingKeys;
+ std::set_difference(keysNeeded.begin(), keysNeeded.end(),
+ currentSet.begin(), currentSet.end(),
+ std::inserter(missingKeys, missingKeys.end()));
+
+ std::set<std::string> res;
+
+ std::transform(missingKeys.begin(), missingKeys.end(),
+ std::inserter(res, res.end()),
+ [] (auto it) { return it + "="; });
+ return res;
+}