upd: tools almost done
This commit is contained in:
@ -33,4 +33,19 @@ void VariableContainer::WriteVariable(const std::string &name,
|
||||
return;
|
||||
}
|
||||
top[name] = value;
|
||||
}
|
||||
void FucntionContainer::AddFunction(const std::string &name,
|
||||
const FunctionItem &item) {
|
||||
if (FunctionIndex.find(name) != FunctionIndex.end()) {
|
||||
throw InterpretException("AddFunction: function already exists");
|
||||
}
|
||||
FunctionIndex[name] = item;
|
||||
}
|
||||
|
||||
std::any FucntionContainer::CallFunction(
|
||||
const std::string &name, const std::vector<ParaArguItemType> &args) {
|
||||
if (FunctionIndex.find(name) == FunctionIndex.end()) {
|
||||
throw InterpretException("CallFunction: function not found");
|
||||
}
|
||||
// TODO
|
||||
}
|
Reference in New Issue
Block a user