mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 21:11:50 +00:00
relative values, types check
This commit is contained in:
parent
17426705ae
commit
b38128ef39
6 changed files with 185 additions and 19 deletions
|
|
@ -59,6 +59,14 @@ namespace cmd {
|
|||
return &args[index];
|
||||
}
|
||||
|
||||
Argument* getArgument(const std::string& keyword) {
|
||||
auto found = kwargs.find(keyword);
|
||||
if (found == kwargs.end()) {
|
||||
return nullptr;
|
||||
}
|
||||
return &found->second;
|
||||
}
|
||||
|
||||
dynamic::Value execute(const Prompt& prompt) {
|
||||
return executor(prompt.args, prompt.kwargs);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue