MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / bfs_node

Function bfs_node

common/peg-parser.cpp:921–936  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

919}
920
921static void bfs_node(common_peg_ast_arena &arena, std::ostringstream & oss, const common_peg_ast_node & node, int indent) {
922 for (int i = 0; i < indent; i++) {
923 oss << " ";
924 }
925 oss << "NODE " << node.id;
926 if (!node.rule.empty()) {
927 oss << " (rule " << node.rule << ")";
928 }
929 if (!node.tag.empty()) {
930 oss << " (tag " << node.tag << ")";
931 }
932 oss << " ['" << node.text << "']\n";
933 for (const auto child : node.children) {
934 bfs_node(arena, oss, arena.get(child), indent + 1);
935 }
936}
937
938std::string common_peg_ast_arena::dump() {
939 std::ostringstream oss;

Callers 1

dumpMethod · 0.85

Calls 2

emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected