Initial take on Tracer hooks
This will allow the user to add hooks in for debugging / execution tracing / throttling / etc for each node execution The cost is *almost* 0 if no tracing is enabled.
This commit is contained in:
@@ -580,7 +580,8 @@ namespace chaiscript
|
||||
{fun(&AST_Node::to_string), "to_string"},
|
||||
{fun([](const chaiscript::AST_Node &t_node) -> std::vector<Boxed_Value> {
|
||||
std::vector<Boxed_Value> retval;
|
||||
std::transform(t_node.children.begin(), t_node.children.end(),
|
||||
const auto children = t_node.get_children();
|
||||
std::transform(children.begin(), children.end(),
|
||||
std::back_inserter(retval),
|
||||
&chaiscript::var<const std::shared_ptr<chaiscript::AST_Node> &>);
|
||||
return retval;
|
||||
|
Reference in New Issue
Block a user