MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / to_string

Method to_string

include/chaiscript/language/chaiscript_common.hpp:533–543  ·  view source on GitHub ↗

Prints the contents of an AST node, including its children, recursively

Source from the content-addressed store, hash-verified

531
532 /// Prints the contents of an AST node, including its children, recursively
533 std::string to_string(const std::string &t_prepend = "") const {
534 std::ostringstream oss;
535
536 oss << t_prepend << "(" << ast_node_type_to_string(this->identifier) << ") "
537 << this->text << " : " << this->location.start.line << ", " << this->location.start.column << '\n';
538
539 for (auto & elem : get_children()) {
540 oss << elem.get().to_string(t_prepend + " ");
541 }
542 return oss.str();
543 }
544
545
546 static bool get_bool_condition(const Boxed_Value &t_bv, const chaiscript::detail::Dispatch_State &t_ss) {

Callers

nothing calls this directly

Calls 3

ast_node_type_to_stringFunction · 0.85
getMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected