Skip to content

Commit 982621d

Browse files
authored
Merge pull request DeusData#2459 from DeusData/fix/doc-comment-capture
fix(extract): capture complete doc comments across languages
2 parents b7f67c2 + dab9187 commit 982621d

7 files changed

Lines changed: 1946 additions & 63 deletions

File tree

‎internal/cbm/cbm.h‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,11 @@ typedef struct CBMFileResult {
642642
// by cbm_free_result(); ordinary single-file results leave these zeroed.
643643
struct CBMFileResult **owned_results;
644644
int owned_result_count;
645+
646+
/* The file's own doc, set on its File node: the Go package comment or
647+
* the Rust inner docs (//!). NULL for other languages and undocumented
648+
* files. */
649+
const char *module_doc;
645650
} CBMFileResult;
646651

647652
// --- Enclosing function cache ---
@@ -728,6 +733,11 @@ typedef struct {
728733
/* How many nodes the unified walk actually visited (whether or not it ran
729734
* out of budget) — the measurement the budget has to be expressed in. */
730735
uint32_t walk_nodes_visited;
736+
/* Doc-comment lookup state (extract_defs.c), NULL until first used and
737+
* allocated in `scratch`: the memo of parents' child arrays and the Perl
738+
* POD section index. */
739+
void *doc_memo;
740+
void *doc_pod_index;
731741
} CBMExtractCtx;
732742

733743
// --- Public API ---

0 commit comments

Comments
 (0)