Last active
August 19, 2019 20:43
-
-
Save morgangallant/53c93bb03943692bd39f9962e0eb423a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unordered_map> | |
// Checks if this node has been flattened yet. | |
bool is_flattened() const { return offset_ == -1; } | |
// New private member variables for Node class. | |
// Stores the module offset for flattening. | |
int offset_ = -1; | |
// Maps each trigger word to a set of integer IDs. | |
std::unordered_map<std::string, std::vector<int>> ids_; | |
// Maps each integer ID to an associated function to execute. | |
std::unordered_map<int, std::function<void()>> execs_; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment