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

Function parse_css_imports

internal/cbm/extract_imports.c:2794–2809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2792}
2793
2794static void parse_css_imports(CBMExtractCtx *ctx) {
2795 TSTreeCursor cursor = ts_tree_cursor_new(ctx->root);
2796 if (!ts_tree_cursor_goto_first_child(&cursor)) {
2797 ts_tree_cursor_delete(&cursor);
2798 return;
2799 }
2800 do {
2801 TSNode node = ts_tree_cursor_current_node(&cursor);
2802 const char *k = ts_node_type(node);
2803 if (strcmp(k, "import_statement") == 0 || strcmp(k, "use_statement") == 0 ||
2804 strcmp(k, "forward_statement") == 0 || strcmp(k, "include_statement") == 0) {
2805 css_push_import_from_stmt(ctx, node);
2806 }
2807 } while (ts_tree_cursor_goto_next_sibling(&cursor));
2808 ts_tree_cursor_delete(&cursor);
2809}
2810
2811// --- HTML imports ---
2812// `<script src="app.js">` and `<link href="style.css">` reference sibling

Callers 1

cbm_extract_importsFunction · 0.85

Calls 1

Tested by

no test coverage detected