CommandsInterpreter.execute

This commit is contained in:
MihailRis 2024-05-10 17:55:30 +03:00
parent 3f8f34cf5d
commit 172cfe4ec9

View File

@ -94,6 +94,14 @@ namespace cmd {
Prompt parse(std::string_view text);
dynamic::Value execute(std::string_view input) {
return execute(parse(input));
}
dynamic::Value execute(const Prompt& prompt) {
return prompt.command->execute(prompt);
}
dynamic::Value& operator[](const std::string& name) {
return variables[name];
}