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

Function ts_string_field

internal/cbm/doclink_ts.c:445–454  ·  view source on GitHub ↗

A string literal's content (quotes dropped). */

Source from the content-addressed store, hash-verified

443
444/* A string literal's content (quotes dropped). */
445static void ts_string_field(ts_walk_t *w, TSNode s) {
446 uint32_t b = ts_node_start_byte(s);
447 uint32_t e = ts_node_end_byte(s);
448 const char *src = w->ctx->source;
449 if (e - b >= PAIR_LEN && (src[b] == '"' || src[b] == '\'' || src[b] == '`')) {
450 b++;
451 e--;
452 }
453 ts_sb_field(w->sb, src + b, e - b);
454}
455
456static TSNode ts_source_of(TSNode stmt) {
457 TSNode s = ts_node_child_by_field_name(stmt, TS_FIELD("source"));

Callers 3

ts_import_recFunction · 0.85
ts_walk_export_clauseFunction · 0.85
ts_walk_exportFunction · 0.85

Calls 1

ts_sb_fieldFunction · 0.85

Tested by

no test coverage detected