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

Function ValidateScript

src/script_parser.cpp:479–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477}
478
479Result ValidateScript(const std::string& script)
480{
481 try
482 {
483 auto exprs = Scripting::parseStatements(script);
484 if(exprs.empty())
485 {
486 return nonstd::make_unexpected("Empty Script");
487 }
488 return {};
489 }
490 catch(RuntimeError& err)
491 {
492 return nonstd::make_unexpected(err.what());
493 }
494}
495
496} // namespace BT

Callers 2

TESTFunction · 0.85
LLVMFuzzerTestOneInputFunction · 0.85

Calls 4

parseStatementsFunction · 0.85
make_unexpectedFunction · 0.85
emptyMethod · 0.45
whatMethod · 0.45

Tested by 1

TESTFunction · 0.68