refactor(extract): rename ts_node_stack.h to extract_node_stack.h

Pure rename — no logic change. The header is consumed only by
internal/cbm/extract_*.c, depends on tree_sitter/api.h, and is purpose-
built for AST traversal during extraction. The "extract_" prefix makes
the scope explicit and keeps the file naming consistent with its
neighbours (extract_calls.c, extract_imports.c, ...).

- internal/cbm/ts_node_stack.h -> internal/cbm/extract_node_stack.h
- Include guard CBM_TS_NODE_STACK_H -> CBM_EXTRACT_NODE_STACK_H
- Header banner comment updated
- 9 call sites in internal/cbm/extract_*.c updated to the new path

Full suite: 2824 passed, 0 failed.
This commit is contained in:
Martin Vogel committed 2026-05-08 23:26:32 +02:00
1 parent 632278a245
commit 1468c636ee
10 files changed
+13 -13

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
#include "lang_specs.h"
#include "extract_unified.h"
#include "foundation/constants.h"
#include "ts_node_stack.h"
#include "extract_node_stack.h"
#include "tree_sitter/api.h" // TSNode, ts_node_*
#include <stdint.h> // uint32_t
#include <string.h>
+1 -1
View File
@@ -24,7 +24,7 @@
#include "arena.h"
#include "helpers.h"
#include "foundation/constants.h"
#include "ts_node_stack.h"
#include "extract_node_stack.h"
#include "tree_sitter/api.h"
#include <stdint.h>
#include <string.h>
+1 -1
View File
@@ -3,7 +3,7 @@
#include "helpers.h"
#include "lang_specs.h"
#include "foundation/constants.h"
#include "ts_node_stack.h"
#include "extract_node_stack.h"
#include "simhash/minhash.h"
#include "semantic/ast_profile.h"
#include "tree_sitter/api.h" // TSNode, ts_node_*
+1 -1
View File
@@ -4,7 +4,7 @@
#include "lang_specs.h"
#include "extract_unified.h"
#include "foundation/constants.h"
#include "ts_node_stack.h"
#include "extract_node_stack.h"
#include "tree_sitter/api.h" // TSNode, ts_node_*
#include <stdint.h> // uint32_t
#include <string.h>
+1 -1
View File
@@ -4,7 +4,7 @@
#include "lang_specs.h" // CBMLangSpec, CBMEmbeddedLangSpec, cbm_lang_spec, cbm_ts_language
#include "tree_sitter/api.h" // TSNode, ts_node_*
#include "foundation/constants.h"
#include "ts_node_stack.h"
#include "extract_node_stack.h"
#include <stdint.h> // uint32_t
#include <string.h>
#include <ctype.h>
@@ -1,5 +1,5 @@
/*
* ts_node_stack.h — Growable TSNode stack for AST traversal.
* extract_node_stack.h — Growable TSNode stack for AST traversal.
*
* Replaces fixed-size TSNode stack[] arrays that silently drop AST subtrees
* when the stack overflows (GitHub issue #199).
@@ -9,8 +9,8 @@
* Initial capacity matches the previous fixed caps so small files allocate
* no extra memory.
*/
#ifndef CBM_TS_NODE_STACK_H
#define CBM_TS_NODE_STACK_H
#ifndef CBM_EXTRACT_NODE_STACK_H
#define CBM_EXTRACT_NODE_STACK_H
#include "arena.h"
#include "tree_sitter/api.h"
@@ -50,4 +50,4 @@ static inline TSNode ts_nstack_pop(TSNodeStack *s) {
return s->items[--s->count];
}
#endif /* CBM_TS_NODE_STACK_H */
#endif /* CBM_EXTRACT_NODE_STACK_H */
+1 -1
View File
@@ -5,7 +5,7 @@
#include "extract_unified.h"
#include "tree_sitter/api.h" // TSNode, ts_node_*
#include "foundation/constants.h"
#include "ts_node_stack.h"
#include "extract_node_stack.h"
enum { MAX_EXCEPTION_NAME_LEN = 100, LAST_IDX = 1 };
#include <stdint.h> // uint32_t
+1 -1
View File
@@ -5,7 +5,7 @@
#include "extract_unified.h"
#include "tree_sitter/api.h" // TSNode, ts_node_*
#include "foundation/constants.h"
#include "ts_node_stack.h"
#include "extract_node_stack.h"
#include <stdint.h> // uint32_t
#include <string.h>
#include <ctype.h>
+1 -1
View File
@@ -5,7 +5,7 @@
#include "extract_unified.h"
#include "tree_sitter/api.h" // TSNode, ts_node_*
#include "foundation/constants.h"
#include "ts_node_stack.h"
#include "extract_node_stack.h"
enum { MIN_TYPE_LEN = 1 };
+1 -1
View File
@@ -4,7 +4,7 @@
#include "extract_unified.h"
#include "tree_sitter/api.h" // TSNode, ts_node_*
#include "foundation/constants.h"
#include "ts_node_stack.h"
#include "extract_node_stack.h"
enum { MAX_PARENT_DEPTH = 10, LAST_IDX = 1 };
#include <stdint.h> // uint32_t