mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 21:41:50 +00:00
CommandsInterpreter.execute
This commit is contained in:
parent
3f8f34cf5d
commit
172cfe4ec9
1 changed files with 8 additions and 0 deletions
|
|
@ -94,6 +94,14 @@ namespace cmd {
|
||||||
|
|
||||||
Prompt parse(std::string_view text);
|
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) {
|
dynamic::Value& operator[](const std::string& name) {
|
||||||
return variables[name];
|
return variables[name];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue