MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / dbt_last_lit_string

Function dbt_last_lit_string

internal/cbm/extract_dbt.c:84–94  ·  view source on GitHub ↗

Rightmost lit_string under `node` in DFS order. Both dbt builtins put the * referenced relation last: ref('model'), ref('package', 'model') and * source('group', 'table') all name the relation in their final string * argument. The callee itself is an identifier, never a lit_string, so it * cannot be mistaken for one. */

Source from the content-addressed store, hash-verified

82 * argument. The callee itself is an identifier, never a lit_string, so it
83 * cannot be mistaken for one. */
84static TSNode dbt_last_lit_string(TSNode node, TSNode best, bool *found) {
85 if (strcmp(ts_node_type(node), "lit_string") == 0) {
86 best = node;
87 *found = true;
88 }
89 uint32_t cc = ts_node_child_count(node);
90 for (uint32_t i = 0; i < cc; i++) {
91 best = dbt_last_lit_string(ts_node_child(node, i), best, found);
92 }
93 return best;
94}
95
96/* Collect ref()/source() targets from a jinja2 parse tree into `out`, which is
97 * the file's usage array. Usages are scoped to enclosing_qn (the Model). */

Callers 1

collect_dbt_refsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected