Toolchain sync fixes

This commit is contained in:
GriffinR
2024-09-12 12:59:51 -04:00
parent 2ed7806380
commit 93b4a7b815
6 changed files with 107 additions and 32 deletions
+7
View File
@@ -45,6 +45,13 @@ int main(int argc, char *argv[])
return "//\n// DO NOT MODIFY THIS FILE! It is auto-generated from " + jsonfilepath +" and Inja template " + templateFilepath + "\n//\n";
});
env.add_callback("contains", 2, [](Arguments& args) {
string word = args.at(0)->get<string>();
string check = args.at(1)->get<string>();
return word.find(check) != std::string::npos;
});
env.add_callback("subtract", 2, [](Arguments& args) {
int minuend = args.at(0)->get<int>();
int subtrahend = args.at(1)->get<int>();