MCPcopy Create free account
hub / github.com/covscript/covscript / eval

Function eval

sources/covscript.cpp:654–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

652 }
653
654 cs::var eval(const context_t &context, const std::string &expr)
655 {
656 tree_type<cs::token_base *> tree;
657 std::deque<char> buff;
658 for (auto &ch : expr)
659 buff.push_back(ch);
660 context->compiler->build_expr(buff, tree);
661 return context->instance->parse_expr(tree.root());
662 }
663} // namespace cs

Callers 1

mainFunction · 0.85

Calls 3

build_exprMethod · 0.80
parse_exprMethod · 0.80
rootMethod · 0.45

Tested by

no test coverage detected