diff options
| author | Maxime Coste <mawww@kakoune.org> | 2019-04-25 11:59:42 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2019-04-25 11:59:42 +0100 |
| commit | 0cc89b2b9f3cdeff960bd55a865ee0f52fa98d25 (patch) | |
| tree | bd4860272e271f215e4d9ba7d2049be9f44ac211 /src/command_manager.hh | |
| parent | 429eeb252c6e7ac8512c2bd98ed3b18c62d7f37b (diff) | |
| parent | f49644e8ee8b2450f28b82d74fcf823d81f2ae1c (diff) | |
Merge remote-tracking branch 'laelath/provides-requires'
Diffstat (limited to 'src/command_manager.hh')
| -rw-r--r-- | src/command_manager.hh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/command_manager.hh b/src/command_manager.hh index 0468a1fc..329c24f2 100644 --- a/src/command_manager.hh +++ b/src/command_manager.hh @@ -123,6 +123,12 @@ public: void clear_last_complete_command() { m_last_complete_command = String{}; } + bool module_defined(StringView module_name) const; + + void register_module(String module_name, String commands); + + void load_module(StringView module_name, Context& context); + private: void execute_single_command(CommandParameters params, Context& context, @@ -143,6 +149,14 @@ private: String m_last_complete_command; int m_command_depth = 0; + struct Module + { + bool loaded; + String commands; + }; + using ModuleMap = HashMap<String, Module, MemoryDomain::Commands>; + ModuleMap m_modules; + CommandMap::const_iterator find_command(const Context& context, StringView name) const; }; |
