A tree with parse errors: functions, methods and types are found wherever * the extractor's walk finds them (it descends into everything but function * nodes), so that this scan and the graph agree on what is declared. An * explicit stack: the depth is the input's. */
| 1823 | * nodes), so that this scan and the graph agree on what is declared. An |
| 1824 | * explicit stack: the depth is the input's. */ |
| 1825 | static void go_scan_error_tree(go_scan_t *s, TSNode root) { |
| 1826 | int cap = 0; |
| 1827 | int top = 0; |
| 1828 | TSNode *stack = (TSNode *)go_grow(s->tmp, NULL, 0, &cap, sizeof(TSNode)); |
| 1829 | if (!stack) { |
| 1830 | s->failed = true; |
| 1831 | return; |
| 1832 | } |
| 1833 | stack[top++] = root; |
| 1834 | while (top > 0 && !s->failed) { |
| 1835 | TSNode n = stack[--top]; |
| 1836 | if (go_scan_decl(s, n) || go_kind_is(n, "method_elem") || go_kind_is(n, "func_literal")) { |
| 1837 | continue; |
| 1838 | } |
| 1839 | stack = go_push_children(s, n, stack, &top, &cap); |
| 1840 | } |
| 1841 | } |
| 1842 | |
| 1843 | static int go_claim_cmp(const void *a, const void *b) { |
| 1844 | const go_claim_t *x = (const go_claim_t *)a; |
no test coverage detected