| 2792 | } |
| 2793 | |
| 2794 | static 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 |
no test coverage detected