MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / ParseScriptAndExecute

Function ParseScriptAndExecute

src/script_parser.cpp:462–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462Expected<Any> ParseScriptAndExecute(Ast::Environment& env, const std::string& script)
463{
464 auto executor = ParseScript(script);
465 if(executor)
466 {
467 try
468 {
469 return executor.value()(env);
470 }
471 catch(RuntimeError& err)
472 {
473 return nonstd::make_unexpected(err.what());
474 }
475 }
476 return nonstd::make_unexpected(executor.error());
477}
478
479Result ValidateScript(const std::string& script)
480{

Callers 2

TESTFunction · 0.85
LLVMFuzzerTestOneInputFunction · 0.85

Calls 4

ParseScriptFunction · 0.85
make_unexpectedFunction · 0.85
valueMethod · 0.45
whatMethod · 0.45

Tested by 1

TESTFunction · 0.68