| 83 | } |
| 84 | |
| 85 | extern "C" void dbg_eval_with_value(const Value& value, const char *text) |
| 86 | { |
| 87 | std::unique_ptr<Expression> expr; |
| 88 | |
| 89 | try { |
| 90 | ScriptFrame frame(true); |
| 91 | frame.Locals = new Dictionary({ |
| 92 | { "arg", value } |
| 93 | }); |
| 94 | expr = ConfigCompiler::CompileText("<dbg>", text); |
| 95 | Value result = Serialize(expr->Evaluate(frame), 0); |
| 96 | dbg_inspect_value(result); |
| 97 | } catch (const std::exception& ex) { |
| 98 | std::cout << "Error: " << DiagnosticInformation(ex) << "\n"; |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | extern "C" void dbg_eval_with_object(Object *object, const char *text) |
| 103 | { |
nothing calls this directly
no test coverage detected