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

Function source_has_jinja_expr

internal/cbm/extract_dbt.c:49–56  ·  view source on GitHub ↗

Cheap pre-filter: does the source contain a Jinja expression opener? Files * without one cannot hold a ref()/source() call, and skipping them keeps the * second parse off every ordinary .sql file in the repository. */

Source from the content-addressed store, hash-verified

47 * without one cannot hold a ref()/source() call, and skipping them keeps the
48 * second parse off every ordinary .sql file in the repository. */
49static bool source_has_jinja_expr(const char *s, int len) {
50 for (int i = 0; i + 1 < len; i++) {
51 if (s[i] == '{' && s[i + 1] == '{') {
52 return true;
53 }
54 }
55 return false;
56}
57
58/* Strip one pair of surrounding quotes from a jinja lit_string. The grammar
59 * hands back the token with its quotes attached. */

Callers 1

cbm_extract_dbtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected