A region tree-sitter-make could not parse (an indented, nested ifeq does * it) still holds rules and assignments; an assignment counts as certain * only outside the conditionals its lines open. */
| 3238 | * it) still holds rules and assignments; an assignment counts as certain |
| 3239 | * only outside the conditionals its lines open. */ |
| 3240 | static void mk_collect_error(mk_t *m, TSNode err, bool cond) { |
| 3241 | uint32_t scan = ts_node_start_byte(err); |
| 3242 | uint32_t end = ts_node_end_byte(err); |
| 3243 | int depth = 0; |
| 3244 | for (uint32_t i = 0; i < ts_node_named_child_count(err); i++) { |
| 3245 | TSNode c = ts_node_named_child(err, i); |
| 3246 | uint32_t cb = ts_node_start_byte(c); |
| 3247 | while (scan < cb && scan < end) { |
| 3248 | uint32_t le = scan; |
| 3249 | while (le < end && m->src[le] != '\n') { |
| 3250 | le++; |
| 3251 | } |
| 3252 | depth += mk_directive_delta(m->src + scan, m->src + le); |
| 3253 | depth = depth < 0 ? 0 : depth; |
| 3254 | scan = le + SKIP_ONE; |
| 3255 | } |
| 3256 | mk_collect_one(m, c, cond || depth > 0); |
| 3257 | } |
| 3258 | } |
| 3259 | |
| 3260 | static void sh_makefile(sh_pass_t *p, const char *rel, const char *src, size_t len) { |
| 3261 | if (!ts_parser_set_language(p->parser, cbm_ts_language(CBM_LANG_MAKEFILE))) { |
no test coverage detected